[BUG] Agent Teams teammates ignore bypassPermissions for Bash and don't inherit project settings.local.json
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When spawning Agent Teams teammates via the Task tool with mode: "bypassPermissions", the teammates still prompt the parent session's user for Bash command approval. Additionally, permissions saved via "Yes, and always allow" from teammate prompts (which write to project settings.local.json) are not inherited by teammates in subsequent sessions.
Three separate issues compound here:
bypassPermissionsdoesn't bypass Bash prompts for teammates. Teammates spawned withmode: "bypassPermissions"still trigger permission prompts for Bash commands likemkdir,cat << heredoc,node /tmp/..., etc.
- Teammates don't inherit project
settings.local.json. The project-level settings file accumulates 100+ "always allow" entries over time, but teammates don't read them. Commands likeBash(mkdir:*),Bash(cat:*),Bash(node)are all present in projectsettings.local.jsonbut teammates still prompt.
- "Always allow" from teammate prompts doesn't persist. Selecting option 2 ("Yes, and always allow access to X from this project") on a teammate permission prompt does not prevent the same prompt in the next session's teammates.
What Should Happen?
mode: "bypassPermissions"should grant teammates full Bash execution without prompts, matching the behavior for non-team subagents.- Teammates should inherit permissions from the project's
settings.local.json. - "Always allow" selections from teammate prompts should persist and apply to future teammate sessions.
Error Messages/Logs
No error messages — teammates function correctly once approved. The issue is the repeated user intervention required.
Example prompts that appear despite bypassPermissions:
Bash command · @architect
mkdir -p <project>/.claude/state/feedback
Ensure feedback directory exists
Do you want to proceed?
› 1. Yes
2. Yes, and always allow access to feedback/ from this project
3. No
Bash command · @architect
cat << 'SCRIPT' > /tmp/generate-level1-1.mjs
// Level generator script...
Do you want to proceed?
› 1. Yes
2. Yes, and always allow...
3. No
Same prompts appear for other teammates running node scripts to parse JSON files.
Steps to Reproduce
- Start Claude Code (default permission mode, NOT delegate mode)
- Create a team:
TeamCreate: { team_name: "test-team" } - Spawn a teammate with bypassPermissions:
````
Task: {
subagent_type: "general-purpose",
mode: "bypassPermissions",
name: "worker",
team_name: "test-team",
prompt: "Run: mkdir -p /tmp/test-dir && echo hello > /tmp/test-dir/file.txt"
}
- Observe: User is prompted to approve the
mkdirandechocommands despitebypassPermissions. - Select "Yes, and always allow" on each prompt.
- End session, start new session, repeat steps 2-4.
- Observe: Same prompts appear again — "always allow" did not persist for teammates.
Environment
- Project
settings.local.jsoncontains 100+ allow rules includingBash(mkdir:*),Bash(cat:*),Bash(node),Bash(bash:*),Bash(grep:*), etc. — all accumulated from previous "always allow" selections. None are inherited by teammates. - Global
~/.claude/settings.jsonallow rules were added as a workaround — effectiveness for teammates TBD.
Related Issues
- #24307 / #24073 / #23447: Delegate Mode strips ALL tools from teammates (more severe, different root cause)
- #11380: "Always allow" not persisting generally (Windows, not team-specific)
- #24505: Feature request for per-teammate hook configuration
Claude Model
Opus 4.6
Is this a regression?
I don't know
Claude Code Version
2.1.45
Platform
Anthropic API (Claude Max)
Operating System
macOS (Darwin, Apple Silicon)
Terminal/Shell
Ghostty
Additional Information
Workaround attempted: Adding Bash allow rules to global ~/.claude/settings.json instead of project settings.local.json. This may help if teammates read global but not project settings — testing in progress.
Impact: For workflows that spawn multiple teammates running many Bash commands (e.g., level generation pipelines with 10+ tasks), the user must manually approve dozens of prompts per session. This defeats the purpose of autonomous team operation and makes bypassPermissions ineffective for Agent Teams.
12 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
For me, this is recent. The Anthropic team nerf'd 2.1.45. Revert to 2.1.44 and it's brilliant again.
It's not as bad as their January complete-destruction-of-CC-CLI, but Opus/Sonnet is unusable on .45.
Brilliant again on .44
Great bug report — you've identified three compounding failures that hit hardest in exactly the use case where autonomous subagents are most valuable.
Why bypassPermissions isn't bypassing Bash prompts for teammates
The likely root cause:
bypassPermissionsin the teammate context propagates the permission mode but Bash approval prompts are still gated on the parent session's interactive loop. The teammate is sending tool call requests back through the parent session's UI renderer, which applies its own permission check regardless of the teammate's mode. This is a process-boundary issue: the teammate runs in a separate execution context but approval prompts bubble up to the parent terminal.Workaround for now — set blanket Bash permissions in your global
~/.claude/settings.jsonrather than project-level. Global settings are read before the teammate's execution context is initialized:If global settings also fail for teammates, that confirms the prompts are bypassing the settings lookup entirely — a deeper bug worth adding to this report.
Why settings.local.json isn't inherited
Project
settings.local.jsonis read relative to the working directory of the spawning process, but teammate processes may initialize with a different cwd or run a separate settings scan. The 100+ accumulated "always allow" entries are in the right file, but teammates may be looking somewhere else (or nowhere).The architectural issue underneath all three bugs
All three failures share a root: approval state is distributed (per-session, per-process, per-file) rather than centralized. When multiple agents operate concurrently, you get permission fragmentation. The robust fix is a centralized permission service that all agents — parent and teammates — route through, with state that persists across sessions.
The hooks system (
PreToolUse) already runs synchronously and can gate execution — but teammates need to inherit the hook configuration for this to work, which they currently don't.Suggested additions to your report:
~/.claude/settings.jsonglobal rules are also ignored for teammates (narrows down settings lookup bug vs. UI rendering bug)Blocking bug for unattended multi-agent workflows. "bypassPermissions should actually bypass" is the correct expectation.
Adding a data point from #30323: in some cases, the teammate doesn't even show an interactive prompt in its pane — instead it shows "Permission request sent to team lead" and blocks indefinitely. The approval request never arrives at the team lead as an actionable message. This seems like another manifestation of the same broken teammate permission flow described here.
Also observed intermittent behavior: in one session teammates could use Read/Grep/Glob freely, but after restarting Claude Code the same team required team lead approval for ALL tools.
I have a similar-ish problem where I have a skill that spawns an agent team. One of the agents is directed to read a file for some additional context (it's like 30k of rules; so I don't want it in the spawning/controlling agent's context). No matter what I've added to settings.json I'm always prompted to read the file. Claude itself is like 🤷 file an issue (after several attempts to debug).
so if im reading this correctly:
https://github.com/anthropics/claude-code/issues/26479#issuecomment-3921724367
the advice is to give blanket permissions for tasks? that defeats the entire purpose of the permissions functionality. probably not going to be doing that.
Same issue here but with Write/Edit tools instead of Bash.
Spawned 4 teammates via TeamCreate + Agent (general-purpose, Opus).
When teammates attempt Write tool calls, the permission_request shows
up as raw JSON in the teammate-message stream but never surfaces as
an actionable approval prompt in the UI. The user sees the JSON but
has no approve/deny button.
Unlike the Bash case described above (where a prompt appears but
shouldn't), Write/Edit permission requests produce NO prompt at all —
the teammate just blocks indefinitely waiting for approval that can
never come.
Environment: Claude Code CLI on macOS, claude-opus-4-6, v2.1.x
Workaround: Team lead writes files on behalf of blocked teammates.
Confirmed on v2.1.113 (Apr 17 2026) — reproduces across all 5 workaround permutations (agent-spawn mode, user
defaultMode: auto, userdefaultMode: bypassPermissions, project-committed.claude/settings.json, project.claude/settings.local.json). Same root cause as #49865 (team-lead UI crashes on permission_request marshaling across tmux IPC, so teammate deadlocks). Neither user-level nor project-level permission rules are being inherited by sonnet teammates in tmux-teammate mode.Still reproducing on 2.1.114 — bypassPermissions not inherited by teammates
Confirming this bug is still active on Claude Code
2.1.114(currentlatest, published after all previously-mentioned fix versions 2.1.97 / 2.1.98 / 2.1.101 / 2.1.108).Environment
2.1.114, WSL2 Ubuntu, tmux backendCLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=truepermissions.defaultMode: "bypassPermissions"+skipDangerousModePermissionPrompt: truein~/.claude/settings.jsonclaude --dangerously-skip-permissions -rSymptom
Teammate (auditor,
agentType: general-purpose, spawned via Agent Teams) still shows:...on every
Edit/Write/NotebookEditcall, blocking the teammate indefinitely until the lead manually approves. This contradicts the official documentation at https://code.claude.com/docs/en/agent-teams which states:Additional findings from local investigation
PermissionRequesthook does not fire for team-forwarded requests (confirmed by inspecting the hook's raw stdin log — zero entries originate from teammate sessions while hundreds fire for Lead's own tool calls). The forward appears to go through an internal mailbox channel that entirely bypasses the hook system.teams.skipPermissionRequests,autoApproveTeammates,members[].permissions,members[].permissionMode. The Agent Teams docs explicitly state "you can't set per-teammate modes at spawn time".--dangerously-skip-permissionspass-through to teammate nor an environment variable (CLAUDE_CODE_TEAM_AUTO_APPROVEetc.) exists.permissions.deny: ["Edit(*)", "Write(*)"]to short-circuit the forward before it starts — but this is a crippling workaround that forces all writes to be proxied through the Lead via SendMessage, doubling round-trips and defeating the point of Agent Teams.Impact on real-world usage
This makes Agent Teams effectively unusable for automation scenarios:
bypassPermissionssetting is silently dropped for teammates, violating the principle of least surprise — if the user is trusted enough to grant Lead bypass, that trust should cascade to the teammates the Lead itself spawnsRelated open issues
This bug cluster is tracked across several open issues with overlapping scope: #24307 (Delegate Mode), #43406 (Edit tool), #45291 (
.claudewrites), #25254 (deadlock), #25520 (invisible prompts in VS Code). Consolidating these under a single "teammate permission inheritance" umbrella and shipping a proper fix — or at minimum exposing an explicit opt-in flag that honorsbypassPermissionstransitively — would unblock a significant amount of real-world Agent Teams usage.Reproduction
@anthropic-ai/claude-code@2.1.114CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=trueandpermissions.defaultMode: "bypassPermissions"claude --dangerously-skip-permissionsEditany file — the "Waiting for team lead approval" dialog appearsHope this helps prioritize. Happy to provide
hook_raw_input.logexcerpts or a fresh reproduction trace if useful.Is there any hopes of getting this fixed?
I'm rapidly losing any hope of that. This has been around in various tickets since February and most seem to just get auto-closed.
Kinda feels like this agent team feature is just getting forgotten..... Do the developers who made this feature even use it?