Skip to content

Conversation

@newhook
Copy link
Owner

@newhook newhook commented Jan 31, 2026

Summary

  • Add debug logging throughout the destroy worktree flow (handler, DestroyWork, TerminateWorkTabs) to trace operations and diagnose crashes
  • Add ResetExecutingTasksToPending SQL query and DB method to recover scheduled tasks stuck in 'executing' status after a crash
  • Control plane now automatically resets stuck executing tasks on startup

Test plan

  • All existing tests pass
  • Manually test destroy worktree operation and verify debug logs appear in .co/debug.log
  • Simulate crash during destroy (kill control plane mid-operation) and verify tasks recover on restart

🤖 Generated with Claude Code

- Add debug logging throughout the destroy worktree flow to trace
  operations: handler, DestroyWork, and TerminateWorkTabs
- Add ResetExecutingTasksToPending SQL query and DB method to recover
  scheduled tasks stuck in 'executing' status after a crash
- Control plane now resets stuck executing tasks on startup

This helps diagnose issues when the control plane crashes during
worktree destruction and ensures automatic recovery on restart.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@newhook newhook merged commit 446267d into main Jan 31, 2026
3 checks passed
@newhook newhook deleted the fix/destroy-worktree-crash branch January 31, 2026 15:45
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