Skip to content

feat(roadmap): give the stage runs a call budget and a notice - #4347

Merged
dan-petty merged 1 commit into
mainfrom
feat/4346-give-the-stage-runs-a-call-budget
Nov 10, 2026
Merged

dan-petty merged 1 commit into
mainfrom
feat/4346-give-the-stage-runs-a-call-budget

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

A stage plan run or review run had no call budget that the model can read, so a long run filled the context window, lost its tools and gave a refused reply (113 calls, 2026-11-10). Each request sends the whole context again, so a long run costs the sum of its contexts. Now the prompt of a plan run says about 30 calls and the prompt of a review run says about 40. From call 40 of a plan run and call 60 of a review run, each tool answer ends with a notice to read no more and give the reply. The tools stay on, and the window and count limits stay. A request with problem reads only what the problem names.

Closes #4346

Change: openspec/changes/archive/2026-11-10-4346-give-the-stage-runs-a-call/

@dan-petty dan-petty added type/feature Type feature: a new function scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Nov 10, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Live proof, item #3387, devops roadmap stage --plan --item 3387, model deepseek-v4.1-flash-1017, 2026-11-10. One run each. Before: the code of origin/main (699026e). After: that code with this change, the change of #4341 (PR #4342) and the change of #4338 (PR #4339) together.

Step Before: time, requests, tool calls, input tokens After: time, requests, tool calls, input tokens
Plan run 790 s, 58, 79, 6,476,125 382 s, 24, 41, 1,550,406
Return after a gate 170 s, 4, 4, 199,660 70 s, 1, 0, 45,501
Review run 1 1,138 s, 52, 92, 5,619,080 384 s, 33, 63, 2,128,230
Repair plan run 625 s, 34, 49, 3,047,453 348 s, 22, 33, 1,353,793
Review run 2 868 s, 63, 97, 7,264,016 (the window ended its tools) not reached
Whole item 62 min, 211 requests, 321 calls, 22.6 M input tokens 21 min, 80 requests, 137 calls, 5.1 M input tokens
Outcome staged (6 task groups) failed at the repair revision: a scenario names stage.pr and no behavior test names it

The plan run stopped at call 41 and the review run at call 63, near the calls of the notice (40 and 60). The model obeys the notice. The failed outcome is a form fault of one revision, and a repair round has no return for it: see #4348. One run each is too few to say that the outcome changed because of this change.

Spend, by tokens at 0.30 USD per million input tokens and 1.20 USD per million output tokens (a price in the range of OpenRouter prices for DeepSeek flash models, with no cache discount; the local price table has no price for the model): before about 7.1 USD, after about 1.7 USD.

@dan-petty
dan-petty force-pushed the feat/4346-give-the-stage-runs-a-call-budget branch from 1a1035a to d317197 Compare November 10, 2026 06:11
@dan-petty
dan-petty marked this pull request as ready for review November 10, 2026 06:25
@dan-petty
dan-petty force-pushed the feat/4346-give-the-stage-runs-a-call-budget branch from d317197 to d69f452 Compare November 10, 2026 06:26
@dan-petty
dan-petty force-pushed the feat/4346-give-the-stage-runs-a-call-budget branch from d69f452 to c0bc79f Compare November 10, 2026 06:41
@dan-petty
dan-petty enabled auto-merge (squash) November 10, 2026 06:42
@dan-petty
dan-petty merged commit ec377c4 into main Nov 10, 2026
26 checks passed
@dan-petty
dan-petty deleted the feat/4346-give-the-stage-runs-a-call-budget branch November 10, 2026 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(roadmap): give the stage runs a call budget and a notice

1 participant