--bare makes every machine behave the same.
It skips hooks, skills, plugins, MCP and CLAUDE.md and ignores your claude.ai login, so it needs ANTHROPIC_API_KEY or an apiKeyHelper.
--max-turns and --max-budget-usd only work in print mode.
The budget is a client-side estimate, so treat it as a brake, not an exact bill.
--json-schema returns the answer in a structured_output field.
If a run ends without valid output the field is simply absent, so always check for it.
Capture session_id from JSON output to chain calls.
The next call continues the same conversation, so a script can run a task in steps.
SIGTERM exits with code 143 and leaves the turn unfinished; SIGINT ends it cleanly.
CLAUDE_CODE_RESUME_INTERRUPTED_TURN=1 continues an interrupted turn on resume.
Without --bare, -p shows no trust dialog but still runs project hooks and connects .mcp.json servers.
That happens even in a folder you never trusted, so use --bare on code you did not write.
Passing github_token: secrets.GITHUB_TOKEN stops CI from running on Claude's commits.
GitHub ignores events created by that token. Use an app token or a personal one if you want CI to run.
A scheduled GitHub run is attributed to whoever last edited the cron line.
If that is a bot, add it to allowed_bots. GitHub also disables schedules in public repos after 60 days of no activity.
claude --bg --exec runs a shell job as a background PTY job.
It is a way to keep a long command alive without tying up a terminal.