feat(worktree): auto-rescue dirty worktrees during cleanup#356
Conversation
dimakis
left a comment
There was a problem hiding this comment.
Centaur Review
LGTM — no issues found.
…aft PR Add rescueDirtyWorktree() that programmatically rescues stale worktrees with uncommitted work: stages all changes, commits, pushes, and creates a draft PR via gh CLI. Wired into cleanupStaleWorktrees so rescue is attempted before falling back to the existing skip-and-notify behavior. Also updates the CLOSEOUT_PROMPT in chat.ts to instruct the agent to push branches and create PRs during session closeout, reducing the number of dirty worktrees that need rescue. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- getMcpConfigPaths() now reads ~/.claude.json (same mcpServers format as Cursor) so context7 and other globally-configured MCP servers are available in Mitzo sessions - Fix readonly tuple incompatibility with execFileSync in rescueDirtyWorktree Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
72e33dc to
31a43a0
Compare
Centaur ReviewFound 6 issue(s) (3 warning).
|
Summary
rescueDirtyWorktree()which stages all changes, commits them, pushes the session branch, and creates a draft PR viagh pr create, then posts the PR URL to the mgmt inbox.Test plan
server/__tests__/rescue-worktree.test.tscoversgetRepoRemote()(SSH/HTTPS parsing, error cases) andrescueDirtyWorktree()(success path, failure at each step)🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com