| … | … | @@ -434,35 +434,55 @@ const make = Effect.gen(function* () { | |
| 440 | + | git | |
| 441 | + | .hasCommit({ cwd: project.workspaceRoot, refName }) | |
| 442 | + | .pipe(Effect.mapError(mapError(input, "provision-worktree", threadId))); | |
| 443 | + | if (!(yield* hasCommit(startRef)) && !(yield* hasCommit("HEAD"))) { | |
🟠 High orchestration-v2/ThreadLaunchService.ts:443
When an empty repository takes this project-folder fallback, queued messages are held instead of running after the current turn succeeds: the run still records workspacePreparation.type as "worktree", so Orchestrator.handleRunUpdate treats the null thread.worktreePath as failed provisioning. Persist the resolved root strategy when taking this fallback, or otherwise distinguish it from a missing worktree.
🤖 Copy this AI Prompt to have your agent fix this:
| 1 | In file @apps/server/src/orchestration-v2/ThreadLaunchService.ts around line 443: |
| 2 | |
| 3 | When an empty repository takes this project-folder fallback, queued messages are held instead of running after the current turn succeeds: the run still records `workspacePreparation.type` as `"worktree"`, so `Orchestrator.handleRunUpdate` treats the null `thread.worktreePath` as failed provisioning. Persist the resolved root strategy when taking this fallback, or otherwise distinguish it from a missing worktree. |
Note
🤖 Composer responding on behalf of wSedlacek
Real bug. A successful empty-repo fallback left workspacePreparation.type === "worktree" with worktreePath: null, and startNextQueuedRun treated that like failed setup (the check did not require failed/interrupted).
Pushed in 6f4fa525c2:
prepared-run.releaserewrites preparation to{ type: "root" }when a worktree was requested but no path was bound- queue hold now requires failed or interrupted worktree prep, matching the other call sites
- covered by the empty-repo launch assertion and a runtimeLayer queue-promotion case
Sorry, I'm unable to act on this request because you do not have permissions within this repository.