Auto mode dropped on first turn after session start despite `--permission-mode auto` / `defaultMode: "auto"`

Status Open
Reported on v2.1.285
Maintainer reply None cached
Activity 1 comment · opened Sep 30, 2026

Summary

With permissions.defaultMode: "auto" in user settings, sessions often run their first turn in default (Manual) mode, even though auto mode is requested and available. Auto mode only takes effect from the second turn, after the Desktop app re-sends setPermissionMode auto. It reproduces on:

  • brand-new Desktop sessions that were prewarmed,
  • Desktop sessions restored ("warmed") after an app restart,
  • Desktop rewind/fork respawns,
  • at least once in the terminal CLI (2.1.285), with no project-level mode override.

It does not happen every time. Some sessions start correctly in auto on the same version.

Environment

  • macOS (Darwin 27.0.0), Claude Desktop app (Code tab)
  • Claude Code bundled with Desktop: 2.1.284. Terminal CLI: 2.1.285 (npm, via nvm).
  • User settings (~/.claude/settings.json): "permissions": { "defaultMode": "auto" }, "model": "opusplan", "sandbox": { "enabled": true }
  • No managed settings, no disableAutoMode, and no hooks that touch permission mode.
  • Remote Control was tested both on and off. The drop happens either way.

Expected

The first turn runs in auto mode, because the setting and the launch flag both ask for it and the app reports auto as available.

Actual

The first turn runs in default. The transcript's first user entry has "permissionMode": "default", and the auto-mode system reminder is missing until turn 2. The mode switches to auto only after the Desktop app calls setPermissionMode again, which it does right after the first assistant response.

Evidence (one fresh, prewarmed Desktop session)

App log (~/Library/Logs/Claude/main.log, local time UTC+8):

14:52:36 [info] [permissionMode] spawn local_06ba13a0-… mode=auto provisional=false source=settings_default_mode autoState=available requested=auto effective=auto mdmAutoOff=false
14:52:36 [info] [CCD] prewarm local_06ba13a0-… booting in <new session folder>
14:53:15 [info] [CCD] prewarm local_06ba13a0-… claimed (booting, lead 38820ms)
14:53:15 [info] Sending message to session local_06ba13a0-…
14:53:21 [info] [CCD start-timing] local_06ba13a0-… init=67ms first_assistant=6187ms …
14:53:22 [info] [CCD] LocalSessions.setPermissionMode: sessionId=local_06ba13a0-…, mode=auto

The Claude Code process was launched with (from ps, trimmed):

claude --output-format stream-json --input-format stream-json --verbose --model claude-opus-5-5
       --permission-mode auto --permission-prompt-tool stdio --await-initialize
       --setting-sources=user,project,local --settings {…} --replay-user-messages …

Session transcript (537f6630-….jsonl):

  • 2026-09-30T06:53:15Z first user message: "permissionMode": "default"
  • 2026-09-30T06:53:29Z first auto_mode attachment (turn 2)
  • later user messages: "permissionMode": "auto"

So the app requests auto correctly, and the command line carries it. The mode is lost between process start and the first turn.

Other occurrences

| CLI session | Entrypoint | How it started | First-turn mode |
|---|---|---|---|
| 537f6630 | Desktop 2.1.284 | fresh prewarm, claimed while "booting" | default |
| f3246111 | Desktop 2.1.284 | fresh prewarm, claimed while "booting" | default |
| 05a12e0c | Desktop 2.1.284 | resume, then several "Warming session" restores after app relaunch | default after 6 of 7 restores. The exception is 13:55, when the mode was switched by hand (default → auto) before sending. |
| bf844ce4 | Desktop 2.1.284 | rewind + forkSession respawn | default |
| 4dfae82c | Desktop 2.1.284 | rewind + forkSession respawn | auto |
| 66b9e6c8 | Desktop 2.1.284 | not determined | auto |
| bfe6277c | terminal CLI 2.1.285 | plain claude in a project with no mode override | default, then auto later |
| e60932f9 | terminal CLI 2.1.285 | plain claude, 2 minutes later | auto |

For the Desktop "Warming session" restores, the log has no [permissionMode] spawn … line at all. On every warm it logs [SettingsResolver] Ignoring defaultMode "auto" from projectLocal tier. The user-tier setting should still apply, and fresh prewarmed sessions without that warning drop too.

Where the mode might be lost (not confirmed)

  1. Claude Code may not honor --permission-mode auto (or defaultMode: "auto") when auto-mode availability isn't settled at startup, and fall back to default. The intermittent terminal case points this way.
  2. In --await-initialize mode, the app's initialize request may override the command-line mode with default.

The logs available to me can't tell these apart.

Workaround

Switch to Auto manually once after each app restart or new session, before sending the first prompt.

Possibly related

  • #97878 (open, no details; may be the same symptom)

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗