Claude Code v2.1.302 changes how unattended runs behave. A claude -p or Agent SDK session on a third-party provider, or with telemetry off, now starts in Manual mode instead of auto mode, and fork subagents are on by default. CI jobs that relied on the old defaults can quietly stop editing files or run longer.
What was released
The changes were announced by Anthropic on 16 October 2026 in the Claude Code v2.1.302 release notes. They apply to anyone who updates the Claude Code CLI or the Agent SDK, with no new setting to turn on: the new behaviour arrives with the version. The same release adds CLAUDE_CODE_AUTO_MODE_MODEL, which chooses the model the client-side auto mode classifier uses.
What changed for headless runs
Starting permission mode. The permission modes reference still describes the earlier rule: a claude -p or Agent SDK session that does not fetch feature flags, such as one on a third-party provider or with telemetry off, started in auto from v2.1.285. From v2.1.302, those sessions start in default, Manual mode. Passing --permission-mode auto keeps auto mode. This matters because, as the headless guide explains, a claude -p run with no permission host denies every request that would otherwise prompt. A Bedrock pipeline that edited files and ran tests under auto mode will now have those calls refused unless an allow rule covers them.
Fork subagents on by default. Forks are now on in claude -p, the Agent SDK, the desktop app and VS Code, as they already were in the terminal. The subagents reference describes what a fork is: a subagent that inherits the whole conversation, the same system prompt, tools and model, and the main session's prompt cache. That page still says fork mode is off in claude -p and the SDK; the release notes supersede it. With fork mode on, subagents run in the background and Claude cannot ask for the foreground, while a subagent's own Agent calls now run in the foreground by default. CLAUDE_CODE_FORK_SUBAGENT=0 turns forks off.
Hook concurrency. At most 12 prompt or agent hooks of one event now run at a time; the rest wait their turn.
What to check in your CI and SDK jobs
In CodeDTX's view, these are the steps to take before rolling v2.1.302 into pipelines:
- Pin the permission mode in every job. Do not rely on a built-in default that has now changed twice in a few releases. Pass
--permission-modeexplicitly:autoif you want the classifier,dontAskwith a precise--allowedToolslist for locked-down CI, oracceptEditsfor lint-fix jobs. - Decide whether forks belong in your pipeline. Because a fork shares the parent's prompt cache, the subagents reference says it costs less than a fresh subagent for tasks that need the same context. The trade-off is isolation: a fork skips the tool filters a custom subagent would apply and sees everything in the conversation. If your design depends on a read-only reviewer subagent with a narrow tool list, deny the
forktype with anAgent(fork)rule or setCLAUDE_CODE_FORK_SUBAGENT=0. - Put a ceiling on run time and spend. The headless guide says a claude -p run stays open until background subagents finish, because their results are part of the output. More background work means longer jobs. Set a job timeout in your CI runner and
--max-budget-usd, which stops remaining background work when it is reached. - Check your stream parsers. Subagent messages in
stream-jsonoutput are keyed byparent_tool_use_id, and which subagents run in the background has changed. If a dashboard or audit step reads that stream, run it against a v2.1.302 job before upgrading everywhere, and keep the records your AI agent audit trail depends on. - Pin the Claude Code version in CI. Upgrade deliberately, read the release notes for "Changed" lines, and promote a new version through a staging pipeline first, as you would roll out any AI agent in stages.
When to hold back
If your pipelines already pass --permission-mode and use the Anthropic API directly with telemetry on, the permission change does not touch you, and forks are the main difference to test. If you run on Bedrock, Google Cloud or Foundry with no explicit mode, treat v2.1.302 as a breaking change and hold it until each job sets its mode. Manual mode is the safer default for unattended runs, so the fix is to grant the access each job needs, not to switch everything back to auto. Permissions are one layer alongside sandboxing and review, as covered in stopping an agent taking a wrong action.
Frequently asked questions
Why did my claude -p job stop editing files after upgrading Claude Code?
From v2.1.302, a claude -p or Agent SDK session on a third-party provider such as Amazon Bedrock, or with telemetry off, starts in Manual mode instead of auto mode. With no permission host, any action that would prompt is denied. Pass --permission-mode auto to keep the classifier, or add allow rules for the edits and commands the job needs.
What is a fork subagent in Claude Code?
A fork is a subagent that inherits the whole conversation so far, including the system prompt, tools, model and message history, instead of starting fresh. Only its final result returns to the main conversation. Because its first request reuses the parent's prompt cache, it is cheaper than a fresh subagent for tasks that need the same context, but it gives up input isolation.
How do I turn fork subagents off in the Agent SDK?
Set the environment variable CLAUDE_CODE_FORK_SUBAGENT to 0, which turns fork mode off in every kind of session. If you want fork mode on but do not want Claude to spawn forks, deny the fork subagent type with an Agent(fork) permission rule instead. Either way, test the job afterwards, because subagent behaviour and run length can change with the setting.
Does Claude Code v2.1.302 affect interactive terminal sessions?
Mostly not. Interactive terminal sessions already had fork mode on, and they keep auto mode as their built-in starting permission mode. The release does cap prompt and agent hooks at 12 of one event running at a time, which applies everywhere, and it adds an Idle compaction row to /config so you can turn idle compaction off or back on.



