Pulling the "mouth that runs without a human in the loop" back to manual by default — Claude Code v2.1.302 tightens auto-approval for headless/SDK runs and aligns subagent defaults
Claude Code v2.1.302 changes things so that claude -p / Agent SDK sessions that don't explicitly set a permission mode now start in default mode when running via third parties. Together with fork-type subagents being on by default and unified background execution, it realigns the initial settings fo
Anthropic's coding agent "Claude Code" has shipped v2.1.302. Rather than flashy new features, the real story this time is that it quietly rewrote a number of the defaults that govern "what happens when the agent runs on its own." In particular, the default behavior of terminal-less claude -p (headless execution) and the Agent SDK has changed, so the more you rely on unattended pipelines, the more this affects you.
Autonomy via third parties has been pulled back to "asking first"
Claude Code has a normal mode (default) that asks for permission on every action, and an auto mode that approves most actions automatically and keeps going. v2.1.302 changed things so that claude -p and Agent SDK sessions that don't explicitly set a permission mode now start in default mode when running on third-party model providers (this applies when telemetry is off or the environment is freshly set up). If you want to keep running in auto, specify --permission-mode auto explicitly.
This rolls back the "just auto-approve everything" default that had been spreading, at least for part of the headless/SDK path. A setup that runs in auto with no human watching — through your own gateway or a third party — risks silently letting through actions you never intended. Shifting the default toward "ask first" can be read as a tightening of that entry point. Flip it around, and you have to be careful: unattended jobs that previously assumed auto may now get stuck waiting for permission partway through after this update.
Subagent defaults are now aligned across environments
The other axis is that subagent (the helper agents the main agent invokes internally) defaults are now brought into line across terminal, SDK, desktop, and VS Code. In short, there are three points:
- Fork-type subagents are on by default:
subagent_type: "fork"is now enabled by default inclaude -p, the Agent SDK, desktop, and VS Code, making it easier to run with separate context. To disable it, useCLAUDE_CODE_FORK_SUBAGENT=0(not available underclaude mcp serve). - Subagents of the main conversation always run in the background: desktop and VS Code, whose behavior had varied until now, run them in the background just like the terminal.
- Agent calls that a subagent in turn invokes default to the foreground: these "grandchild" calls run up front, so they're harder to lose track of.
Previously, the same instructions could make subagents run differently depending on where you launched them, which made behavior hard to predict. With the defaults unified, automation you've validated in a local terminal is more likely to behave the same when you carry it straight over to desktop or VS Code.
The "knobs" for autonomy got added too
Alongside the rethinking of defaults, there are more fine-grained controls to work with.
- You can choose the model that makes auto-mode decisions: a new environment variable,
CLAUDE_CODE_AUTO_MODE_MODEL, lets you specify the model used by the client-side auto-mode classifier (the server-side decision model doesn't change). - Toggle idle auto-compaction from
/config: idle compaction, which folds up a long conversation while you're away from your desk, now has an on/off toggle in the settings screen, and after it runs you're shown how to disable it. - Fixed a stall in server-side-decided auto mode: instead of being denied on every action in a long conversation, it now compacts the conversation first and then proceeds.
- Faster startup in plugin-heavy environments: file scanning during the loading of command and agent definitions is substantially reduced, speeding up startup especially on Windows.
An update that prompts an "inventory of settings" for unattended operation
This v2.1.302 is less about adding new capabilities and more an update that realigned the initial values for "what gets automatically approved, and how far, when no one is watching." On sites running the agent via cron or CI, it's safer to check the following points after updating:
- Do auto-assuming unattended jobs explicitly set
--permission-mode auto? (Otherwise they may stall waiting for permission.) - In configurations that go through third-party model providers, is the scope of auto-approval what you intended?
- Does fork-type subagents being on by default match your expected token consumption and level of parallelism?
At the same time, the very fact that these default changes arrive in almost daily updates forces operators to "read each diff and revisit their settings" every time. The more convenience and automation advance, the heavier two questions become: the operational cost of continually tracking changes to default values, and who is responsible for inspecting where the line for auto-approval is drawn — a point worth keeping in mind as you follow this kind of update.
References: Claude Code changelog (official) / Releasebot: Claude Code updates / gradually.ai: Claude Code changelog / ai-tldr.dev: Claude Code 2.1.302


