Repository navigation
feat(worktrees): track setup progress and recover cancelled drafts - #608
Conversation
Preflight repository and base commit availability before creating the thread. Fall back to the project checkout for non-Git directories and repositories without a usable base commit, while preserving valid worktree setup. (cherry picked from commit dd6ba84dc96f83000388e14b90f6533d5f63315d)
…372) Starting a thread in a new worktree showed one static "Setting up worktree" line while git fetched, checked out files, and the setup script ran. Users could not tell which step was slow, see setup script output without hunting for the terminal, or stop a setup that was going wrong. The timeline now shows a card with each step and its elapsed time. Check out files has a percent bar fed by git's own progress output. The setup script step shows the last lines of its terminal inline and links to the full terminal. Cancel stops the bootstrap and removes the half built worktree. Work locally cancels, switches the draft to the project checkout, and resends. The server keeps an in-memory per-thread snapshot of the bootstrap stages and streams it over a new subscribeWorktreeSetup RPC. The bootstrap runs as a child fiber so worktreeSetup.cancel can interrupt it, and the turn handoff is uninterruptible. The setup script's exit code comes from a per-run sentinel echoed after the command in the setup PTY. Created with Claude Fable 5.1 in Claude Code. (cherry picked from commit 73b206f4bf99e7e98ae144a9d9edbf7cb2700fc1)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit 5ea6439816470288d3f2b6b43635fea41fbbb101)
(cherry picked from commit 5623089aea68ca62811f51321686c259fa4c810f)
…ad (#11836) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> (cherry picked from commit 0310cbf9f46ca94e9df0231a3440bca08ac44709)
…ead (#11852) Co-authored-by: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit 2c19283afed1e3b69a9af33360980527aeb37494)
…11883) Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com> (cherry picked from commit ae53072af0560c0606202b87b5fdb7e52d48ac5c)
…2015) Co-authored-by: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit 0f5a1513e09fb41e0d0f86157aff64cc3657975d)
(cherry picked from commit 3bee4c286e586c2eb7f8d196a65b4b5ea6a95241)
(cherry picked from commit 4abb07eac3d47543b5804e8039633ac8ad7f67d2)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@codex review |
|
Completed the combined-diff review, including upstream PR context and Pylon entry points. Findings fixed before landing:
CI's unused-export finding was fixed in |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
Final iOS verification: replaced the nested navigation stack inside the setup modal because its React actions did not receive taps. The existing React Native modal layout responds immediately. A fresh mobile send was cancelled from Details; Edit task recovered both the original prompt and the note entered during setup. Cancellation also worked after reopening the app. The server removed both unfinished threads without starting a provider turn. Updated sheet, recovered draft, and native cancellation video:
mobile-cancel-recovery.mp4 |








New worktrees previously exposed little setup progress, and a cancelled or interrupted setup could strand its prompt or leave a starting session behind. This adopts the complete upstream setup series across server, web/desktop, and mobile: staged checkout/script progress, cancellation with cleanup, durable prompts and history, optional blocking setup scripts, and a fresh composer for background sends.
Pylon adaptations preserve admission receipts, source epochs, compaction, provider ownership, remote authorization and existing message context. Additional fixes retain retry drafts through early prompt persistence, keep failed background sends separate from newer drafts, settle interrupted preparing receipts even when rollback fails, scope retention timers, and stop motion when hidden, unfocused or reduced-motion is enabled. Canonical sandbox paths are excluded from session discovery on macOS.
Closes #605. Continues #598 and the existing-port reconciliation in #604. The review cursor stays unchanged. This group accounts for 10 of the 164 remaining sources in the frozen range, leaving 154 after merge. No release or physical-device update is included.
Verification
2ed2480addand the task implementation against the same disposable setup. Before/after screenshots and web videos and final iOS cancellation evidence are uploaded. iOS is the representative native platform; Android-specific sheet execution was not exercised. Blocking scripts and live cancellation require an updated server; older servers retain their existing behavior.ad3325050d(including fix(prime): restore follow-up input after stopping subagents #606), whose Prime-only changes do not overlap this series. CI must pass on the PR head before merge.Upstream attribution
Original author commits are preserved with cherry-pick provenance. Thanks to the upstream contributors for the complete setup series; Pylon-specific follow-up fixes are in a separate commit.
dd6ba84dc96f83000388e14b90f6533d5f63315d— fix(server): fall back when new worktrees are unavailable (#6208)73b206f4bf99e7e98ae144a9d9edbf7cb2700fc1— feat(web): show each worktree setup step and let users cancel it (#11372)5ea6439816470288d3f2b6b43635fea41fbbb101— feat(web): inline worktree setup rows and async setup scripts (#11832)5623089aea68ca62811f51321686c259fa4c810f— fix(server): disable color probes in worktree setup (#11843)0310cbf9f46ca94e9df0231a3440bca08ac44709— fix: keep worktree setup visible after leaving and reopening the thread (#11836)2c19283afed1e3b69a9af33360980527aeb37494— feat(server): persist the worktree setup send and progress on the thread (#11852)ae53072af0560c0606202b87b5fdb7e52d48ac5c— fix(web): keep the composer ready during background worktree setup (#11883)0f5a1513e09fb41e0d0f86157aff64cc3657975d— fix(web): stop the worktree setup card from flashing and shifting (#12015)3bee4c286e586c2eb7f8d196a65b4b5ea6a95241— fix(server): settle cancelled worktree setup before rollback (#12176)4abb07eac3d47543b5804e8039633ac8ad7f67d2— feat(mobile): port worktree setup progress and agent handoff (#12177)Implemented with GPT-6 in Codex.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.