claude-code - 💡(How to fix) Fix New `claude agents` background session starts in auto permission mode without asking

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fix / Workaround

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.json has permissions.defaultMode: "acceptEdits" — the new background session ignores this and comes up in auto, not acceptEdits and not default.
  • No CLAUDE_* env var sets a permission mode.
  • This is not the /bg or ←← "preserve current mode" path (2.1.141) — it's a freshly dispatched session from claude agents.

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.

RAW_BUFFERClick to expand / collapse

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.json has permissions.defaultMode: "acceptEdits" — the new background session ignores this and comes up in auto, not acceptEdits and not default.
  • No CLAUDE_* env var sets a permission mode.
  • This is not the /bg or ←← "preserve current mode" path (2.1.141) — it's a freshly dispatched session from claude 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

  1. Set permissions.defaultMode: "acceptEdits" in ~/.claude/settings.json.
  2. Start a new background session via claude agents.
  3. Observe the new session's permission mode is auto, not acceptEdits.

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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING