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

Resolved 💬 3 comments Opened May 15, 2026 by zienag Closed May 16, 2026

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 ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗