[BUG] Agent with isolation="worktree" causes Warp terminal to split into two panes, both stall (Windows)
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?
When an Agent tool call uses isolation="worktree" on Windows with the Warp terminal, the terminal splits into two separate panes. The top pane shows the subagent working inside the worktree directory, the bottom pane shows the main Claude Code session idle. Neither makes meaningful progress — the agent stalls (likely due to SQLite/file locking conflicts from the worktree path) and the main session just waits, burning tokens.
This has happened 3 times across different GSD framework workflows (/gsd:execute-phase, /gsd:plan-phase). Each time:
- Zero actual work completed
- Tokens and usage limits consumed
- Required manual restart and switching to inline-only execution
What Should Happen?
When isolation="worktree" is used:
- The terminal should NOT split into separate panes — the subagent should run within the existing session view
- If the worktree agent encounters file locking issues, it should fail gracefully with an error, not silently stall
- The main session should have a timeout or health check on the spawned agent
Screenshot
The Warp terminal after the split occurs:
(The top pane shows agent bash commands running in .claude/worktrees/agent-a4bd60e8/, bottom pane shows main session idle with "Sleeping..." status)
Key observations from the screenshot:
- Top:
gsd-executor (Execute plan 30-01 backend) Sonnet 4.6— agent is in the worktree, running commands - Bottom:
Claude Code v2.1.98 - Claude Max— main session completely idle, not processing - Both panes show separate status bars with independent token counters
- The bottom pane's token counter keeps climbing despite no productive work
Steps to Reproduce
- Open Claude Code v2.1.98 in Warp terminal on Windows 11
- Navigate to a project that is a git repository with an SQLite database
- Use the Agent tool with
isolation="worktree"(or run a framework like GSD that triggers this internally) - Observe: Warp terminal splits into two panes
- Observe: Agent in top pane stalls, main session in bottom pane idles
- Both panes consume tokens with no progress
Related Issues
- #40968 — Similar Windows worktree issue (unwanted worktrees, stuck CWD) but different symptom (terminal split vs CWD stuck)
- GSD framework issue: https://github.com/gsd-build/get-shit-done/issues/1510
Claude Model
Opus
Is this a regression?
Not sure — first time using worktree isolation on Windows + Warp
Claude Code Version
Claude Code v2.1.98
Platform
Anthropic API (Claude Max)
Operating System
Windows 11 Home Single Language (10.0.26200)
Terminal/Shell
Warp (with bash shell)
Additional Information
Workaround: Remove all isolation="worktree" parameters from Agent tool calls. Subagents work correctly without worktree isolation — they execute in the same repository, and git conflicts are managed with --no-verify for parallel commits.
The issue may be Warp-specific — Warp might interpret the worktree subprocess as a new terminal session and split the view. Would be useful to know if this reproduces on Windows Terminal or Git Bash.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗