Skip to content

Conversation

@bborn
Copy link
Owner

@bborn bborn commented Jan 24, 2026

Summary

  • Fixes race condition between detail view and executor when user enters task view immediately after creating a queued task
  • Detail view now waits for executor to create panes when task is Queued with no WorktreePath
  • Existing ensureTmuxPanesJoined() automatically joins panes once executor creates them

Test plan

  • Create a new task and immediately enter task view
  • Verify only one Claude pane appears (not two)
  • Verify pane uses correct worktree path once executor completes setup

🤖 Generated with Claude Code

When a user enters task view immediately after creating a queued task,
there was a race condition between the detail view and executor:

1. Detail view called startPanesAsync() which created Claude panes
   using the project directory (no worktree yet)
2. Executor's setupWorktree() completed and runClaude() killed the
   existing window, then created new panes with the worktree path
3. This resulted in duplicate panes or pane churn

The fix: when task is Queued with no WorktreePath set, the detail view
now waits for the executor to create panes instead of creating them
itself. The existing ensureTmuxPanesJoined() in Refresh() will
automatically join the panes once the executor creates them.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bborn bborn merged commit 02614da into main Jan 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants