Repository navigation
fix(mcp): algorithm_spec and plan next name the probe and a capped start - #1298
Merged
Merged
Conversation
A successful algorithm_spec told the host to start unprobed and uncapped. next now names plan(spec, probe=true) and start with max_calls from the estimate (or <N> if none). A successful plan without probe carries the same next shape. Refused probe contract is unchanged. Closes #1296
Collaborator
Author
|
Review (Birfy) Tip SHA: ae85e51
|
Birfy
enabled auto-merge (squash)
November 27, 2026 10:51
This was referenced Nov 27, 2026
Birfy
added a commit
that referenced
this pull request
Nov 28, 2026
Closes #1305 Base: f0edb1e Tip SHA: 5e40eb8 ## 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 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 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
This was referenced Nov 28, 2026
Birfy
added a commit
that referenced
this pull request
Nov 28, 2026
Closes #1307 Base: f9c35b5 Tip SHA: 001b346 ## What changed On tip `f9c35b5`, MCP `algorithm_spec` and `plan` already rewrite `next` into host tool language (#1296 / #1298 / #1303 / #1305). MCP `demo` still returned the shared CLI `demo --json` list untouched: ``` next: agentdescent show <run_id> agentdescent apply <run_id> --dry-run agentdescent algorithms run gepa … --out spec.json agentdescent plan spec.json --probe agentdescent evolve spec.json --max-calls <N> agentdescent doctor ``` A host that followed the `algorithm_spec` or `plan` `next` would call those tools; a host that followed this `demo` `next` was told to run CLI verbs it may not have. A successful MCP `demo` now returns: ``` next: call show with this run_id call apply with this run_id and dry_run=true to preview the write to run this card on the user's data, call algorithm_spec with the name, their path and cases, and model and base_url (never guess those), plus rounds=1 and workers=1; if that refuses, follow its next and do not start; otherwise follow its next ``` When no algorithm was named, the last step names `list_algorithms` and then that same `algorithm_spec` call (there is no MCP `init` tool). A real-model-only card's refusal names `algorithm_spec` and `describe_algorithm`, not `agentdescent algorithms run`. The `demo` tool description mentions this tool-language `next`. No model name is guessed. The tool still does not start a real run or probe. The CLI `demo` next and live-model refusal are unchanged. `changelog.d/1307-mcp-demo-next.md`. ## Verification Tip SHA: 001b346 Ran: - `pytest -q -o addopts='' tests/test_mcp.py tests/test_demo.py tests/test_mcp_algorithm_spec.py tests/test_mcp_plan_probe.py tests/test_first_run_caps.py` → 125 passed - `python -m tools.changelog_fragments check` → 59 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
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 #1296
Base: 224e552
Tip SHA: ae85e51
What changed
On tip
224e5521, #1294 / #1297 and earlier first-run work already namedplan --probethen a cappedevolveon the CLI (algorithms run, a successfulplan,init, the demo footers, and the host skills). MCPalgorithm_spec— documented as the same verb asalgorithms run— still ended a successful call with:A host that follows the tool's own
next, rather than the skill / slash-command prose, would start the run unprobed and uncapped. A related gap on the same Path A surface: MCPplan(spec)with the defaultprobe=falsereturnedok: trueand nonextfield at all, while the CLI counterpart already namesplan --probe, thenevolve --max-calls N.A successful
algorithm_specnow returns anextthat namesplan(spec, probe=true)andstartwithmax_callsfromestimate.agent_calls_upper_bound(or<N>when no bound is known). A successful MCPplanwithoutprobereturns anextin the same shape. The plan tool description mentions thisnext. No model name is guessed.algorithm_specstill does not probe itself.changelog.d/1296-mcp-algorithm-spec-next.md.No change to the probe-refusal contract (
ok: false,ready: false, repairnext). CLIalgorithms run --jsonis unchanged.Verification
Tip SHA: ae85e51
Ran:
pytest -q -o addopts='' tests/test_mcp_algorithm_spec.py tests/test_mcp_plan_probe.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→ 95 passedpytest -q -o addopts='' tests/test_mcp_call_limit.py tests/test_connection_kwargs.py tests/test_cli_algorithms_run.py→ 81 passed (together with the algorithm_spec file already counted above)python -m tools.changelog_fragments check→ 54 changelog fragment(s) OKpython -m tools.gen_api_docs --check→ docs/api.md is up to dateNot run: