Claude Code Concurrent Subagents Suffer Severe Worktree Isolation Bug
suncombo · ghdev · 2026-08-07
A developer reported a critical bug in Claude Code where worktree isolation state degrades to global, last-writer-wins state shared across all concurrent subagents.
Key observations include:
- CWD Hijacking: When one subagent calls EnterWorktree, it silently changes the working directory of other concurrently running subagents.
- Identity Drift: The isolation guard self-contradicts by claiming multiple different worktree identities within seconds, falsely blocking agents from editing their own files via absolute paths.
- Silent File Operations: Relative-path operations (e.g., make, git add .) silently land in the wrong agent's worktree.
The reporter noted this issue was triggered four times in a single day, severely undermining the reliability of multi-agent concurrent task execution.
More from coding & agent
- Rollikey: open-source proxy adds pre-flight snapshots and LIFO rollback for production AI agents — Rollikey · 2026-11-30
- Open-source LoRA restyles MiniMax H3 video from a single reference image — linoy_tsaban · 2026-11-30
- Dev shares Avi home AI companion internals: device control, memory and full system prompt — aloncarmel · 2026-11-30
- Microsoft exec explains AI governance with a 4-step closet-cleaning method — donasarkar · 2026-11-30
- Catching steps your AI agent silently skipped: declare required actions per task — Ok-Machine7983 · 2026-11-30
- MoonBit 1.0 RC Ships with Stable Compiler, Targeting February 2027 Release — harryshum · 2026-11-30