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
- 3x DGX Spark cluster runs GLM-5.3-Flash locally behind a proxy, 1.75M tokens/day at 119W — Teknium · 2026-10-16
- GPT-built unifi-simulator makes MikroTik switches appear inside UniFi Network — Pytlicek · 2026-10-16
- Opus 5.5 + Three.js demo stuns with water physics, fish and blossoms — nikola_mr64990 · 2026-10-16
- Grok-built linear regression bot claims $508K PnL in 125 days on Polymarket — Roger_M_Taylor · 2026-10-16
- Karpathy's knowledge engine workflow: Claude Code turns raw notes into a self-updating wiki — nikola_mr64990 · 2026-10-16
- Sierra and Meta unveil Personal Agent Protocol with Zapier as launch partner — sujingshen · 2026-10-16