Repository navigation
Closed
Labels
effort/mediumEffort Mediumpriority/p2-mediumPriority P2: standard workscope/roadmapThe roadmap jobs: intake, refine, stage, implement and the Service that runs themsource/agentFiled by an agenttype/featureType feature: a new functionvalue/highValue High: the delivery of the item matters much
Description
Problem
A stage plan run or a review run has no call budget that the model can read. The prompt says "a limited number of tool calls" and the hard limit is 200 calls (CONST_ROADMAP_STAGE_TOOL_MAX_CALLS) and the window (75% of 256,000 tokens). A model that explores without end reaches the window, loses its tools, and its forced reply is refused. Each request sends the whole context again, so a long exploration costs the sum of the contexts: 6.5 million input tokens for one plan run.
Evidence, 2026-11-10, model deepseek-v4.1-flash-1017, item #3387:
- Service log:
stage reply refused: item=#3387 request=76 input_tokens=206443 tools_offered=False tool_calls=113 limit=window. - Prometheus
devops_cli_roadmap_tool_calls_per_run, rowstage: over 7 days p50 33, p90 43 calls; over the last 12 hours p50 37, p90 86, p99 113. Rowstage_verify: 7 days p50 53, p90 107; 12 hours p50 59, p90 89. - A live run of
devops roadmap stage --plan --item 3387with a trace of each agent run (scratch, not committed): plan run 79 calls, 58 requests, 6.48 million input tokens, 13 minutes (the final reply alone took 192 seconds); gate return 4 calls, 3 minutes; review run 92 calls, 52 requests, 5.62 million input tokens, 19 minutes; repair plan run 49 calls, 34 requests, 3.05 million input tokens, 10 minutes. The item took more than 47 minutes and was still in its second review. - The calls repeat little: 3% of the read lines of the plan run were read before. The run is long because it keeps reading new places, not because it repeats.
Expected
- The prompts of the plan run and the review run give a budget: about 30 calls for a plan and about 40 for a review.
- From a set call (40 for a plan run, 60 for a review run), each tool answer ends with a notice to give the reply now. The tools stay on; the window limit stays.
Acceptance criteria
- A test of
StageToolsshows that the answer of the call at the limit ends with the notice, the answer before it has none, and a new run starts at zero. It fails today. - A test shows that the prompts name the same numbers as the constants.
-
devops roadmap eval stage --replaykeeps its result (81 of 317 defects caught, 0 missed, 5 of 5 good plans accepted). - The pull request reports live runs of an item before and after: minutes, tool calls, requests, input tokens, outcome.
Existing tool considered
pydantic-ai has UsageLimits (the hard stop that the job uses already) and no soft budget. The change adds a counter and a notice. Cost: about 40,000 tokens to build, 3,000 to keep, 3 hours.
Metadata
Metadata
Assignees
Labels
effort/mediumEffort Mediumpriority/p2-mediumPriority P2: standard workscope/roadmapThe roadmap jobs: intake, refine, stage, implement and the Service that runs themsource/agentFiled by an agenttype/featureType feature: a new functionvalue/highValue High: the delivery of the item matters much
Activity
dan-petty commentedon Nov 10, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(roadmap)scope of the title gives the scope.The runs are very expensive and slow but still complete; this is a cost and speed improvement, not a failure.One plan run costs 6.5 million input tokens and 13 minutes; a soft budget and notice cut that cost significantly.The change adds a counter, a notice in tool answers, prompt updates, and tests; the candidate estimates 3 hours.Both deal with stage planner call limits, but #3241 tunes existing hard caps from telemetry data while the candidate adds a new soft budget number in prompts and a notice at a set call count.devops-cli-service commentedon Nov 10, 2026
Released in v0.107.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.107.0
devops-cli-service commentedon Nov 10, 2026
Live since 2026-11-10 07:20 UTC