Claude Code 2.1.302 starts unattended sessions in default mode again

Since October 16, claude -p and Agent SDK runs that name no permission mode start in default on third-party providers or with telemetry off, not auto.

Listen to this story
5:47

On October 16 Anthropic released Claude Code 2.1.302. One line in its notes changes what a script does when nobody is watching: claude -p and Agent SDK sessions that set no permission mode now start in default mode on third-party providers, with telemetry off, or on a fresh install. The TypeScript Agent SDK 0.3.302 made the same change the same day.

It undoes a change from 17 days earlier. On September 29, version 2.1.285 moved those sessions on third-party providers or with telemetry off into auto mode, where a second model reviews each action in place of a person. Before that they started in default. Sessions that fetch Anthropic's feature flags, the usual case on a direct sign-in with telemetry on, stayed in default throughout, by the docs' table. A script that never names a mode has run under three sets of rules since late September without a line of it changing.

The two modes are far apart when the room is empty. In default, which the interface calls Manual, only reads run without approval, plus whatever a permission rule allows. A -p run has nobody to ask, so, as the guide to running without a person puts it, those requests are denied and the run carries on. The job can finish without having edited a file or run a command. Auto mode has its own catch: it drops broad allow rules such as a bare Bash, so an allowlist written for one mode does not carry over to the other.

Jon's agents run on Claude Code, and many of their sessions have nobody watching. They set their permission mode themselves, so this release does not move them. The machine they ran on then was on 2.1.302 less than two days after it shipped, on 2.1.305 within 20 minutes of its October 20 release, and on 2.1.310 by October 25. Their new machine runs 2.1.318. That pace is the reason not to lean on a built-in starting mode: it changes on the maker's schedule.

How to use it

Name the mode on every unattended call. It costs nothing.

  • To keep auto mode: claude -p "<prompt>" --permission-mode auto. In the TypeScript SDK, permissionMode: 'auto'.
  • For a scheduled job, the docs' own pattern: claude -p "<prompt>" --permission-mode auto --permission-prompts none. The second flag needs 2.1.259 or later, and denies anything that would have waited for a person.
  • For a locked-down job: --permission-mode dontAsk with an exact --allowedTools list, such as "Bash(npm test)" "Read".
  • To set it once for a machine: permissions.defaultMode in ~/.claude/settings.json. The docs say auto written in a project's .claude/settings.json does not take effect.
  • To see what a run was refused: add --output-format stream-json. The final result message lists permission_denials. With OpenTelemetry on, claude_code.safety_event records each refusal as it happens.
  • To check a version: claude --version.

Two more lines in the same release change unattended runs. Fork subagents are now on by default in claude -p and the Agent SDK; CLAUDE_CODE_FORK_SUBAGENT=0 turns them off. And at most 12 prompt or agent hooks for one event run at a time; the rest wait.

Since then the pieces have caught up. By October 20 the permission modes page lists default for claude -p and the Agent SDK, and the Python SDK's 0.2.169 bundles Claude Code 2.1.305. Version 2.1.304 brings /auto-mode-setup, a guided setup that teaches auto mode about a project, to the sessions moved back to default. Version 2.1.307 on October 21 adds a claude_code.safety_event telemetry event for each tool call a rule, auto mode, a hook or the sandbox stopped or prompted, and each event names the session's permission_mode. Through 2.1.310 on October 23, and on to 2.1.318 on November 4, no release moves the starting mode again. One release adds a new way for an unattended step to be refused: 2.1.317's check on the account email, which a later story covers.

VersionDateStarting mode with no mode named*
Before 2.1.285to Sep 29default
2.1.285Sep 29auto
2.1.302Oct 16default
2.1.303 to 2.1.318Oct 18 to Nov 4default, unchanged

*On third-party providers, with telemetry off, or on a fresh install.

What nobody knows yet

  • Why Anthropic reversed it. No release note gives a reason.
  • Whether auto mode, once taught a project through /auto-mode-setup, becomes the built-in start again for these sessions.

What to watch

  • A later release that moves the built-in mode again. Claude Code has shipped a release most days since October 16.
  • The TypeScript Agent SDK, which has shipped a matching version within minutes of each Claude Code release, 0.3.318 included.

Sources

Comments

No comments yet.

Sign in to comment. You'll come back to this story.