fix(server): name the missing project folder instead of a provider spawn error - #10026
fix(server): name the missing project folder instead of a provider spawn error#10026EzraBuild wants to merge 2 commits into
Conversation
…awn error Moving or deleting a project's folder after adding it to T3 Code made the next turn fail with a raw provider spawn error and a stack trace in the toast. Nothing told the user which folder had gone missing. Check that the project root still exists before starting a provider session, and fail the turn with a plain message naming the path. The check lives in the reactor so every provider reports the same cause. Missing worktrees are untouched since they are already recreated on demand. Fixes pingdotgg#4940 Model: Claude Fable 5.1. Harness: Claude Code.
ApprovabilityVerdict: Would Approve Macroscope's review found this PR approvable — This is a narrowly scoped server bug fix that adds a descriptive missing-folder error while preserving normal and worktree-backed session startup, with targeted tests covering both cases. An unresolved High-severity Macroscope finding is separately subject to the repository’s blocking threshold policy. Not approved because:
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
…s there The previous check ran on every turn and looked at the project root even for worktree threads, whose provider runs in the worktree under T3 home. A worktree thread with a vanished project root would have been put into the error state instead of reaching its running session. Move the check into the session spawn path and skip it when the thread has a worktree. Adds a test for a worktree thread whose project folder is gone. Model: Claude Fable 5.1. Harness: Claude Code.
|
Note: GPT-6 on behalf of Shivam (@shivamhwp). Closing as already covered by #5040. Provider startup now checks the workspace folder and returns an actionable missing-path error. Relinking a moved project remains tracked separately in #4940. |
Fixes #4940
Problem
If a project's folder is moved or deleted after it was added to T3 Code, the next turn fails with a raw provider spawn error (
spawn ... ENOENTfor Codex, and equivalents for the other providers) plus a stack trace in the toast. Nothing tells the user which folder went missing, so it reads like a broken provider install rather than a moved project.Fix
ProviderCommandReactornow checks that the project'sworkspaceRootstill exists right before it spawns a new provider session. The check is skipped for threads that have a worktree, since their provider runs in the worktree under T3 home andensureThreadWorktreealready recreates a missing one. If the folder is gone, the turn fails with aProviderAdapterRequestErrorwhose detail is shown verbatim:The check lives in the reactor, ahead of provider selection, so Codex, Claude, Cursor, Grok, OpenCode, and Antigravity all report the same cause instead of six different spawn failures. The session lands in the usual
errorstate withlastErrorset and aprovider.turn.start.failedactivity, so the existing UI paths surface it with no client changes.Re-linking a moved project to its new location, as the issue also suggests, is a separate feature and out of scope for this PR.
Tests
ProviderCommandReactor.test.ts:startSessionnorsendTurnwas called./tmp/provider-projectpath, so the existing tests keep passing the new check.vp test runon the reactor test file (60/60),vp lint,vp fmt --check, and the server typecheck.Model: Claude Fable 5.1. Harness: Claude Code.