Create a cloud session straight from the command line with --environment and a prompt, optionally as JSON.
What's wrong with this entry?
Running Claude Code non-interactively with --environment now creates a cloud session straight from the command line. It prints the title, session id, view URL and a resume hint, or with --output-format json emits an object with ok, session_id, url and pool_id. A prompt is required, as a positional argument or on stdin, and its absence is a hard error.
- previously this path needed an interactive terminal
- new counters
tengu_remote_create_session,tengu_remote_create_session_successandtengu_remote_create_session_errorare tagged withentry_point: pool_headless
claude --environment my-pool -p "fix the failing test" --output-format jsonError: non-interactive --environment requires a prompt (positional or stdin). Run from a TTY for an interactive cloud session.
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
-
v2.1.229
Whitespace-only prompts are rejected for
--cloudand--environmentBoth mention environment
-
v2.1.221
Headless MCP startup wait reworked
Both mention environment
-
v2.1.248
MCP errors sent to Remote Control clients are filtered to a fixed list
Both mention environment