--agent is a command-line option that picks an agent for the current session, overriding the agent setting. An agent here is a preset that gives Claude its own instructions and defaults. Setting one up for the session is now done by a single step that applies three things:
- the agent's system prompt, which is the standing instructions Claude follows for the whole session
- the agent's model, unless you chose a model yourself
- the agent's
initialPrompt, a first message the agent starts with
A new option, reapplySystemPromptIfSeated, lets this step apply the agent's system prompt again even when that agent is already active in the session.
In practice an agent's instructions can be put back in place without starting the agent over. A model you picked yourself still takes priority over the one the agent names.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
| `--bg`, `--background` | Start the session as a [background agent](/docs/en/agent-view) and return immediately. Prints the session ID and management commands. Combine with `--exec` to run a shell command as a background job instead of a …cli-reference see the edit
| [`disableSideloadFlags`](/docs/en/settings-reference#disablesideloadflags) | Reject the `--plugin-dir`, `--plugin-url`, `--agents`, and `--mcp-config` flags at startup. In cloud sessions, Claude Code drops the MCP servers the server deli…managed-settings see the edit
The finding does not say what situation makes Claude Code use `reapplySystemPromptIfSeated`.
Anthropic's documentation has since written up --agent, on Deploy managed settings.