Unclear Which flags other than --environment can appear in these errors is not known.
What
Claude Code can start a cloud session from the command line with --cloud or --environment. It can also run headless, meaning non-interactively, with no chat screen, as in claude -p. When you misuse these options, the error messages used to name --environment no matter which flag you had typed. Before, a headless run without a prompt said: Error: non-interactive --environment requires a prompt (positional or stdin).
- The flag name in these errors is now filled in from the flag you actually used, rather than hardcoded as
--environment. - The text in front of the message is also filled in and is no longer always
Error:. - The message saying an option cannot be combined with
--continueis built from that same prefix.
Why
If you started a session with --cloud, the error now points at --cloud instead of a flag you never typed, so it is easier to see what to fix. Scripts that match on the exact wording of these errors may need updating.
| `--environment-id` | The environment to poll for work. Also reads from `ANTHROPIC_ENVIRONMENT_ID`. |see the edit
Which flags other than `--environment` can appear in these errors is not known.