Repository navigation
fix(mcp): plan probe success next is the capped start - #1304
Merged
Merged
Conversation
Closes #1303 Base: 521a879 ## What changed On tip `521a879`, a successful `plan --probe` already names only the capped evolve (#1217): ``` next: agentdescent evolve <spec> --max-calls N ``` MCP `plan(spec, probe=true)` is the same preflight. After a refused probe it already matches the CLI (`ok: false`, `ready: false`, repair `next`). After a successful probe it returned `ok: true` and `ready: true`, but no `next` field at all. `plan_payload` does not carry `next`, and `_with_probe` only wrote `next` on a refusal. A host that followed the unprobed MCP `plan` advice would probe a second time; starting without `next` can launch the run uncapped. After a successful probe, MCP `plan(..., probe=true)` now returns `next` naming only the capped `start`: ``` next: call start with `spec` and max_calls=N ``` `N` is `estimate.agent_calls_upper_bound`, or `<N>` when no bound is known. A refused probe is unchanged. A successful plan without `probe` still names `plan(spec, probe=true)` and then the capped `start`. The plan tool description mentions this already-probed `next`. No model name is guessed. `changelog.d/1303-mcp-plan-probe-next.md`. No change to the probe itself, or to MCP `algorithm_spec` / CLI `plan` / `algorithms run` next lines. ## Verification Ran: - `pytest -q -o addopts='' tests/test_mcp_plan_probe.py tests/test_mcp_algorithm_spec.py tests/test_mcp_algorithm_spec_default_out.py tests/test_mcp_algorithm_spec_target_dir.py tests/test_first_run_caps.py tests/test_mcp.py tests/test_plan_probe.py tests/test_cli_algorithms_run.py` → 143 passed - `python -m tools.changelog_fragments check` → 57 changelog fragment(s) OK - `python -m tools.gen_api_docs --check` → docs/api.md is up to date Not run: - Full offline suite locally — the CI test matrix is the line
Collaborator
Author
|
Review (Birfy) Tip SHA: 9c8d41b
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1303
Base: 521a879
Tip SHA: 9c8d41b
What changed
On tip
521a879, a successfulplan --probealready names only the capped evolve (#1217):MCP
plan(spec, probe=true)is the same preflight. After a refused probe it already matches the CLI (ok: false,ready: false, repairnext). After a successful probe it returnedok: trueandready: true, but nonextfield at all.plan_payloaddoes not carrynext, and_with_probeonly wrotenexton a refusal. A host that followed the unprobed MCPplanadvice would probe a second time; starting withoutnextcan launch the run uncapped.After a successful probe, MCP
plan(..., probe=true)now returnsnextnaming only the cappedstart:Nisestimate.agent_calls_upper_bound, or<N>when no bound is known. A refused probe is unchanged. A successful plan withoutprobestill namesplan(spec, probe=true)and then the cappedstart. The plan tool description mentions this already-probednext. No model name is guessed.changelog.d/1303-mcp-plan-probe-next.md.No change to the probe itself, or to MCP
algorithm_spec/ CLIplan/algorithms runnext lines.Verification
Tip SHA: 9c8d41b
Ran:
pytest -q -o addopts='' tests/test_mcp_plan_probe.py tests/test_mcp_algorithm_spec.py tests/test_mcp_algorithm_spec_default_out.py tests/test_mcp_algorithm_spec_target_dir.py tests/test_first_run_caps.py tests/test_mcp.py tests/test_plan_probe.py tests/test_cli_algorithms_run.py→ 143 passedpython -m tools.changelog_fragments check→ 57 changelog fragment(s) OKpython -m tools.gen_api_docs --check→ docs/api.md is up to dateNot run: