[BUG] Teammates spawned in Delegate Mode have no file access tools despite mode: bypassPermissions
Duplicate of: #24073
---
Preflight Checklist
- [x] I have searched existing issues and found #24073 (same bug, confirmed duplicate)
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
When the lead agent operates in Delegate Mode (configured via /config > Default permission mode > Delegate Mode), teammates spawned via the Task tool lose access to all file operation tools (Bash, Read, Write, Edit, Grep, Glob) even when the Task call explicitly sets mode: "bypassPermissions".
The teammate launches successfully, receives its prompt, creates subtasks via TaskCreate, but cannot execute any file operations. It becomes a text-only agent that can plan but not implement.
In my session, this caused three failed spawn attempts over ~5 minutes, wasting tokens and requiring a full team teardown before any work could begin. The lead agent itself recognized the problem ("The delegate mode is restricting all teammates from having file access") but could not resolve it within the session.
What Should Happen?
mode: "bypassPermissions" on the Task call should grant the spawned teammate full tool access regardless of the lead agent's current permission mode. The lead's Delegate Mode restriction should be scoped to the lead only and should not propagate to child agents.
Error Messages/Logs
No explicit error messages were returned. The tools were silently unavailable — teammates simply did not have Read, Write, Edit, Bash, Grep, or Glob in their tool set. The teammate could only use coordination tools (TaskCreate, TaskUpdate, TaskList, SendMessage).
The lead agent's diagnostic observations from the session transcript:
"The worker doesn't have file access in delegate mode."
"The delegate mode is restricting all teammates from having file access."
"teammates in this mode can't get file access tools"
"delegate mode restricts all teammates to task/messaging tools only"
Steps to Reproduce
- Start Claude Code v2.1.37
- Set Default permission mode to Delegate Mode (via
/configor Shift+Tab) - Create a team:
````
TeamCreate: { team_name: "staged-fix-pr", description: "..." }
- Spawn a teammate with explicit
bypassPermissions:
````
Task: {
subagent_type: "general-purpose",
mode: "bypassPermissions",
name: "phase1-worker",
team_name: "staged-fix-pr",
description: "Phase 1: Stage Model + State",
prompt: "Read and modify scripts/submit_state.py to add stage metadata fields..."
}
- Observe: Teammate launches but cannot call
Read,Write,Edit, orBash. Only coordination tools (TaskCreate,TaskUpdate,TaskList,SendMessage) are available. - Repeat spawn with different name — same result.
- Only resolution: delete the team entirely and switch to non-team Task agents.
Session Evidence
| Metric | Value |
|--------|-------|
| Session ID | e87fa1c5-460a-4a7f-971c-4260c88954d1 |
| Session entries | 160 |
| Session duration | ~5 minutes (wasted on failed spawns) |
| Task spawns attempted | 3 (1 plan reader + 2 failed team workers) |
| TeamCreate calls | 1 |
| TeamDelete calls | 2 |
| SendMessage calls | 6 (shutdown requests to unresponsive workers) |
| TaskCreate calls | 13 (workers creating subtasks they couldn't execute) |
| Productive work completed | 0 (zero files read, written, or edited) |
All three Task spawns used mode: "bypassPermissions":
Task 1: subagent_type=general-purpose, mode=null (plan reader, no team — worked fine)
Task 2: subagent_type=general-purpose, mode=bypassPermissions, team=staged-fix-pr — FAILED (no file tools)
Task 3: subagent_type=general-purpose, mode=bypassPermissions, team=staged-fix-pr — FAILED (no file tools)
Claude Model
Opus 4.6
Is this a regression?
I don't know
Claude Code Version
2.1.37 (Claude Code)
Platform
Anthropic API (Claude Max)
Operating System
macOS (Darwin 25.2.0, Apple Silicon M1 Pro, arm64)
Terminal/Shell
Ghostty
Additional Information
Existing Issue
This is a confirmed duplicate of #24073, reported on Linux/WSL2. This report adds:
- macOS reproduction (cross-platform confirmation)
- Session transcript evidence with exact tool counts and token waste
- Demonstration that the lead agent itself cannot work around the issue mid-session
Workaround from #24073
Spawn teammates before entering Delegate Mode. Teammates spawned before the mode switch retain full tool access. This workaround fails if you need to spawn additional teammates mid-session.
Impact
This bug makes Delegate Mode + Teams unusable for any workflow that requires teammates to read or modify files. Since file operations are the primary purpose of code-generation teammates, this effectively renders the team feature non-functional in Delegate Mode.
Settings at Time of Bug
Auto-compact: true
Thinking mode: true
Default permission mode: Delegate Mode
Verbose output: true
Teammate mode: auto
Model: Default (recommended) → resolved to Opus 4.6This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗