You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Manual run preflight failures permanently discard an existing queued prompt #924
Priority: P1. Reproduced/reviewed at commit 6c7a6fbe on 2026-09-05.
Starting a new user turn consumes an existing queue before validating whether the run can start. If the daily budget gate rejects the run, the old queued instructions are lost, including on disk.
Reproduction
Using a real Store and createRunner:
Create an idle thread and services.setQueued with an existing prompt.
Set dailyBudgetUsd to 1 and recordSpend(1).
Call runner.startRun with a new user prompt.
The call rejects with Daily budget reached.
thread.queued is null, no transcript messages were appended, and reloading the saved Store still yields queued:null.
This was reproduced without launching a provider or touching a real user store.
Cause
The ordinary startRun path calls services.takeQueued and folds the taken text into the local prompt before assertUnderDailyBudget, provider availability and worktree preflight. Unlike drainQueued, this path has no restoration on rejection.
Acceptance
A run that fails before accepting the prompt preserves all previously queued text and attachments.
Cover budget rejection, missing provider and worktree setup failure.
Once a run is accepted, queued content is delivered exactly once.
Restoration must not overwrite follow-ups queued in the meantime.
Include a real Store/runner regression test and verify persistence after reload.
Activity
Keep the queue when a fresh turn fails preflight (#924) (#1652)
Keep the queue when a fresh turn fails preflight (#924)