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
- Agentic coding accessibility will reshape understanding of software complexity — pixlpa · 2026-08-24
- Devin Agent bypasses Slack block by finding emails in git logs — sandylikesfrogs · 2026-08-24
- Developer habits shift: Agents become collaborators from simple tools — latticecut · 2026-08-24
- Dev bottleneck shifts from writing to reading code: exe.dev co-founder — thursdai_pod · 2026-08-24
- The biggest AI mistake: trying to reinvent the wheel instead of using tools — Tired40s · 2026-08-24
- DeepPaperNote turns research papers into Obsidian notes — tom_doerr · 2026-08-24