New `claude agents` background session starts in auto permission mode without asking
What happened
When dispatching a new claude agents background session, the session starts in full auto permission mode without ever asking for consent.
- The user never selected auto mode for that session.
~/.claude/settings.jsonhaspermissions.defaultMode: "acceptEdits"— the new background session ignores this and comes up inauto, notacceptEditsand notdefault.- No
CLAUDE_*env var sets a permission mode. - This is not the
/bgor←←"preserve current mode" path (2.1.141) — it's a freshly dispatched session fromclaude agents.
Expected
A newly dispatched background session should respect the user's configured permissions.defaultMode (or at minimum not silently escalate to auto). Escalating to a more permissive mode than the user configured, without prompting, is surprising and a safety concern.
Actual
New claude agents sessions silently run in auto, auto-approving tool use the user did not consent to for that session.
Steps to reproduce
- Set
permissions.defaultMode: "acceptEdits"in~/.claude/settings.json. - Start a new background session via
claude agents. - Observe the new session's permission mode is
auto, notacceptEdits.
Environment
- Claude Code: 2.1.142
- macOS: 26.3.1
Notes
The default permission mode for a freshly dispatched claude agents session appears undocumented. Either permissions.defaultMode should apply to dispatched sessions, or there should be a documented settings key (not just the --permission-mode dispatch flag) controlling it, and silent escalation to auto should not happen without consent.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗