Skip to content

fix(roadmap): a plan request leaves room for the planner tools - #3523

Merged
dan-petty merged 5 commits into
mainfrom
fix/3477-plan-request-reserve
Nov 4, 2026
Merged

dan-petty merged 5 commits into
mainfrom
fix/3477-plan-request-reserve

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The first request of a plan run could pass the limit at which the run offers no tool. The model then wrote a plan about code that it did not read.

The context cap is now 20,480 tokens and the body cap is 8,192 tokens. A larger window gives no larger cap. A run with read_spec gets the capability names only, and read_spec returns the purpose of one capability. The first request keeps a reserve of 8,192 tokens for tool answers. The trace records the tools of each request, and the stage comment states why a run made no tool call. The golden set plans as the job does.

Closes #3477

Change: openspec/changes/archive/2026-11-04-3477-a-plan-request-leaves-room-for/

The first plan request counted 36,000 to 70,000 tokens and the hook that
ends the tools stops at 49,152. The planner then made no tool call.

The context and the body of the first request have fixed caps. A run
with read_spec gets the capability names and reads each purpose on demand.
RunTrace records the tools that each request offered, and the stage
comment states why a run made no tool call. Tests measure the refine
request against the same limit. Plans #3477.
The recorder wraps the toolbox client, so the class check was false and the
eval sent the full capability entries. The recorder now forwards the flag,
and the planner reads the flag from the client.
@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Nov 4, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Proof and test results for #3477.

Fail-to-pass (devops ci fail-to-pass --base origin/main, run before the review fixes): 8 tests failed on the base, 155 passed, and 1 errored. The new window test module cannot be imported on the base. The failures are in test_roadmap_stage_window, test_roadmap_stage_toolbox, test_roadmap_stage_apply, test_roadmap_stage_tools and test_roadmap_limit_classes. At the old caps the base gets no tool and fails the reserve check.

Review fixes after that run:

  • The golden set wraps the toolbox client in RecordingClient, so the class check was false there. The recorder now forwards reads_specs, and the planner reads the flag from the client. A new test plans through the recorder and fails on the old check.
  • read_spec gives the purpose of a capability that has no requirement. A new test covers it.
  • The spec says that the reserve of 8,192 tokens holds for plain text. A new test with code-like text checks that the first request stays under the limit and offers the tools.
  • The spec says "the name of every capability" and not "170 names".

Scoped tests after the rebase: 175 passed (window, tools, eval run, toolbox, apply and refine investigation). devops openspec check passes.

Known gap, outside this issue: the return request (previous plus problem) adds a full earlier proposal to the first request. No test measures it.

@dan-petty
dan-petty marked this pull request as ready for review November 4, 2026 21:56
@dan-petty
dan-petty merged commit ee0f9c3 into main Nov 4, 2026
23 checks passed
@dan-petty
dan-petty deleted the fix/3477-plan-request-reserve branch November 4, 2026 21:59
dan-petty pushed a commit that referenced this pull request Nov 4, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.56.2](v0.56.1...v0.56.2)
(2026-11-04)


### Bug Fixes

* **roadmap:** a plan request leaves room for the planner tools
([#3523](#3523))
([ee0f9c3](ee0f9c3))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
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/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(roadmap): a plan request leaves room for the planner tools

1 participant