[BUG] Agent teams don't create agents on own worktree
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?
If I start in 2.1.50 claude code with 'claude --tmux -w' and then ask it to create an agent team with each agent in a different worktree, it just doesn't work. They all start on the same worktree and keep editing files over each other - it's a circus.
Then when I complain to the team lead, he tells me it should have worked because he started the agents with "isolation: worktree".
What Should Happen?
Agents in a team are all working in separate worktrees.
Error Messages/Logs
Steps to Reproduce
Start claude in a project: claude --dangerously-skip-permissions -w --tmux
Prompt: "Start a team of 3 agents, each on their own worktree to add the name of their worktree to the file WorkTrees.md, then once they are done, merge all the files into one."
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.52
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
It works with subagents.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗