Builds the claude command-line arguments for one session.
Every launch carries the fixed flags in fixed_args/0. They select the stream-json protocol on stdin and stdout with partial messages, and restrict what Claude Code loads: no built-in tools (--tools ""), only Minga's MCP tools allowed (--allowedTools mcp__minga__*), no MCP servers from ~/.claude.json or .mcp.json (--strict-mcp-config), no settings files and so no hooks or plugins (--setting-sources ""), and no skills or slash commands (--disable-slash-commands). --thinking-display summarized makes Claude Code stream thinking text; without it, 2.1.330 streams thinking blocks with empty text (pi-claude-bridge does the same, see anthropics/claude-agent-sdk-python#830).
Verified CLI version
Claude Code 2.1.330 accepts every flag here together and answers initialize with them. -p is not needed: with stdout not a TTY, Claude Code runs non-interactively. --resume with an id Claude Code does not know makes it exit with status 1 and the message "No conversation found with session ID". @min_version records 2.1.330 as the lowest supported version.
Options
:model- a model alias or id, for example"sonnet".:effort- one of"low","medium","high","xhigh","max". An effort also turns on adaptive thinking (--thinking=adaptive), as the Agent SDK does forthinking: {type: "adaptive"}.:resume- a Claude Code session id to continue.:persist_session-falseadds--no-session-persistence, for isolated queries that must not leave a session behind. Defaults totrue.
No shell runs these arguments, but a value that starts with - would still be read as a flag. argv/1 rejects such values and every value that is not a non-empty string.
Summary
Functions
Builds the argument list. Returns {:error, {:invalid_launch, key}} for an invalid option value.
The flags every launch carries.
The lowest Claude Code version the bridge supports.