Claude Code 2.1.302 quietly changes how claude -p and the Agent SDK behave, and an unattended script can now stall where it used to run fine. Two defaults moved: the starting permission mode, and fork subagents. Both are easy to pin down before you update.
Here’s the short version:
- Release: October 16, marked “Latest” on the official GitHub release page.
- Who’s affected: anyone running
claude -por the Agent SDK, plus desktop app and VS Code users. - Permission mode: sessions with no mode set now start in
defaultin some setups, not auto. - Subagents: fork subagents are now on by default outside the terminal.
- Off switch:
CLAUDE_CODE_FORK_SUBAGENT=0.
These are the settings that decide whether a CI job or cron task keeps working. Check them first, then read on for the detail.
What the Claude Code 2.1.302 update changes for headless runs
The release notes don’t label anything as a breaking change. But several defaults shifted, and defaults are what unattended scripts quietly rely on.
The two that matter most are the permission mode for claude -p and the Agent SDK, and fork subagents. A third, smaller change affects how subagents run in the desktop app and VS Code. We’ll take them one at a time.
Why your claude -p script may stop asking and start failing
Per the release notes, a session with no permission mode now starts in default mode when you’re on a third-party provider, when telemetry is off, or on a fresh install. Before, those sessions started in auto mode.
That sounds minor. It isn’t. Default mode prompts for most edits and shell commands, and a headless run has nobody to answer. According to a DEV Community breakdown, those requests are simply denied, so a job can finish without doing the work.
The fix is to stop depending on the default. You have a few options:
- Pass
--permission-mode autoon the command line. The release notes say this still selects auto mode. - Set
permissions.defaultModein~/.claude/settings.jsonor in managed settings. - Use
--allowedToolsto pre-approve only the tools the job needs.
Explicit beats implicit here. A flag in your script survives the next default change too.
Fork subagents are now on in the SDK, desktop app and VS Code
A fork subagent inherits your whole conversation so far, instead of starting from a blank page. Until now, forks were on by default only in the terminal. In 2.1.302 they are also on in claude -p, the Agent SDK, the desktop app and VS Code.
It also changes how work runs. The desktop app and VS Code now always run the main conversation’s subagents in the background, matching the terminal. A subagent’s own Agent calls run in the foreground by default in those same places.
If your pipeline depends on the old behavior, set CLAUDE_CODE_FORK_SUBAGENT=0. If you want forks available but not used, the same DEV Community write-up suggests a deny rule, Agent(fork), under permissions.deny. That author says the Bedrock details come from the docs, not their own testing, so verify them in your setup. One more detail: claude mcp serve never offers forks.
Claude Code 2.1.302 settings to check before you update
This table pulls the changes and the control for each into one place.
| What changed | Old behavior | New behavior | Your control |
|---|---|---|---|
Starting permission mode (claude -p, SDK) |
Auto mode when no mode set | default on third-party providers, telemetry off, or fresh install |
--permission-mode auto or permissions.defaultMode |
| Fork subagents | On in the terminal only | Also on in -p, SDK, desktop app, VS Code |
CLAUDE_CODE_FORK_SUBAGENT=0 |
| Subagent execution | Claude chose in desktop and VS Code | Always background for the main conversation | None listed in the notes |
| Auto mode classifier model | No dedicated setting | New env var picks the client-side model | CLAUDE_CODE_AUTO_MODE_MODEL |
| Idle compaction | No toggle in /config |
New on/off row in /config |
/config then Idle compaction |
The takeaway: only the first two rows can break an existing script. The others are conveniences.
Smaller fixes that are worth knowing about
The release is mostly fixes. A few stand out if you use plugins or work on large repos.
- Plugin commands no longer exit before a queued settings write finishes, which fixes lost changes and leftover
.tmpfiles. - Plugin marketplaces no longer re-clone on every refresh when git uses the reftable format.
- The Read tool no longer loads huge images fully into memory, and refuses image sources over 128 MB.
- On Windows, file writes are no longer refused on exFAT or FAT32 drives.
Plugin-heavy setups also start faster, especially on Windows. If you’ve been following how Anthropic builds its own tooling, our look at Anthropic Scion and its Git replacement shows the same push toward agent-friendly workflows. And for a real example of the tool at work, see how Claude Code wrote a Linux driver for an unsupported scanner.
Frequently Asked Questions
Does Claude Code 2.1.302 break my existing scripts?
Not by label, since the release notes list no breaking changes. But a headless script on a third-party provider that relied on the old auto-mode start may now get denied actions. Pass --permission-mode auto to be safe.
How do I turn off fork subagents?
Set the environment variable CLAUDE_CODE_FORK_SUBAGENT=0. That disables them everywhere they’re on by default.
What is the new CLAUDE_CODE_AUTO_MODE_MODEL setting?
It selects the model used by the client-side auto mode classifier. It does not change the model for server-side auto mode, per the release notes.
Is the claude -p permission change the same on every setup?
No. The notes tie it to third-party providers, telemetry-off setups and fresh installs. If you’re unsure which applies to you, test one run with a harmless task before updating production jobs.
My take: pin your settings today
Don’t wait for a job to fail overnight. Add an explicit permission mode and an allowed-tools list to every unattended Claude Code call, and decide on purpose whether you want fork subagents. It takes ten minutes, and it makes the next default change a non-event.


Leave a Reply