Repository navigation
fix(mcp): algorithm_spec failed-plan next names plan(probe=true) - #1306
Merged
Merged
Conversation
Closes #1305 Base: f0edb1e Tip SHA: c9549894a3e5c3f305765f09bbb31d5479c59578 ## What changed On tip `f0edb1e`, a successful MCP `algorithm_spec` already rewrites `next` into host tool language (#1296 / #1298): ``` next: show the user this estimate; after their yes, call plan with `spec` and probe=true; if that refuses, follow its next and do not start; otherwise call start with `spec` and max_calls=N ``` When the written spec then failed to plan (missing `cases` path, too few tasks, and the other `algorithms_run_payload` failure paths that return `next`), the tool left the CLI retry untouched: ``` next: agentdescent plan <spec_path> --probe ``` A host that followed the success-path `next` would call the `plan` tool; a host that followed this failed-path `next` was told to run a CLI verb it may not have. A failed-plan `algorithm_spec` now returns: ``` next: fix the written spec, then call plan with that spec and probe=true; if that refuses, follow its next and do not start ``` The `algorithm_spec` tool description mentions this failed-plan `next`. No model name is guessed. The tool still does not start a run or probe. A successful `algorithm_spec` next and the CLI `algorithms run` failed-plan next are unchanged. `changelog.d/1305-mcp-algorithm-spec-failed-next.md`. ## Verification Ran: - `pytest -q -o addopts='' tests/test_mcp_algorithm_spec.py tests/test_mcp_algorithm_spec_default_out.py tests/test_mcp_algorithm_spec_target_dir.py tests/test_mcp_plan_probe.py tests/test_cli_algorithms_run.py tests/test_mcp.py tests/test_first_run_caps.py tests/test_plan_probe.py` → 144 passed - `python -m tools.changelog_fragments check` → 58 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: 5e40eb8
|
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 #1305
Base: f0edb1e
Tip SHA: 5e40eb8
What changed
On tip
f0edb1e, a successful MCPalgorithm_specalready rewritesnextinto host tool language (#1296 / #1298):When the written spec then failed to plan (missing
casespath, too few tasks, and the otheralgorithms_run_payloadfailure paths that returnnext), the tool left the CLI retry untouched:A host that followed the success-path
nextwould call theplantool; a host that followed this failed-pathnextwas told to run a CLI verb it may not have.A failed-plan
algorithm_specnow returns:The
algorithm_spectool description mentions this failed-plannext. No model name is guessed. The tool still does not start a run or probe. A successfulalgorithm_specnext and the CLIalgorithms runfailed-plan next are unchanged.changelog.d/1305-mcp-algorithm-spec-failed-next.md.Verification
Tip SHA: 5e40eb8
Ran:
pytest -q -o addopts='' tests/test_mcp_algorithm_spec.py tests/test_mcp_algorithm_spec_default_out.py tests/test_mcp_algorithm_spec_target_dir.py tests/test_mcp_plan_probe.py tests/test_cli_algorithms_run.py tests/test_mcp.py tests/test_first_run_caps.py tests/test_plan_probe.py→ 144 passedpython -m tools.changelog_fragments check→ 58 changelog fragment(s) OKpython -m tools.gen_api_docs --check→ docs/api.md is up to dateNot run: