New `claude agents` background session starts in auto permission mode without asking

Status Fixed / completed
Reported on v2.1.141
Maintainer reply ✓ Yes — claude[bot]
Activity 3 comments · opened May 15, 2026 · closed May 16, 2026
💡 Likely answer: A maintainer (claude[bot], contributor) responded on this thread — see the highlighted reply below.

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.

View original on GitHub ↗

3 Comments

github-actions[bot] · 5 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/59112
  2. https://github.com/anthropics/claude-code/issues/34923
  3. https://github.com/anthropics/claude-code/issues/49273

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

claude[bot] contributor · 5 months ago

This issue was fixed as of version 2.1.143.

github-actions[bot] · 3 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.