Repository navigation
Description
What happens
On tip b5980f8b (0.11.0, after #1298), a failed agentdescent algorithms run still tells the user to re-plan without --probe.
A successful algorithms run already prints:
next: agentdescent plan <spec> --probe, then agentdescent evolve <spec> --max-calls N
init, a successful plan, the demo footers, and the first-run docs all name that same preflight. But when algorithms run writes a spec and plan refuses it (too few tasks, a missing cases path, leftover placeholders), both the human line and --json next drop --probe:
next: fix <spec>, then agentdescent plan <spec>
"next": "agentdescent plan <spec>"Following that retry skips the preflight every other first-run surface has been teaching since #1218 / #1232: a dead key, endpoint, model or subscription is only found inside a later evolve (or never, if the user also skips --max-calls). The retry is hardcoded in agentdescent/cli.py as retry_line = f"agentdescent plan {out}". MCP algorithm_spec uses the same payload and only rewrites next on success, so a failed call returns the same short CLI line.
This is the same leftover-surface class as #1295 / #1201, now for the failed-plan path of algorithms run.
Repro
Fresh clone of ThinkFlowLab/agentdescent at b5980f8b. pip install -e ".[mcp]". Isolated AGENTDESCENT_HOME so this does not touch a real host tree. A 1-case text fixture is enough (plan refuses fewer than 4 tasks).
agentdescent algorithms run gepa ./prompt.txt ./cases.jsonl --out spec.json \
--model m --base-url https://example.test/v1
# exit 2; error: at least 4 tasks
# next: fix /abs/spec.json, then agentdescent plan /abs/spec.json
agentdescent algorithms run gepa ./prompt.txt ./cases.jsonl --out spec.json \
--model m --base-url https://example.test/v1 --json
# "next": "agentdescent plan /abs/spec.json"By contrast, the same command with enough cases already names the preflight and the cap.
Expected
- After
algorithms runwrites a spec andplanrefuses it, the humannext:line and--jsonnextshould befix <spec>, then agentdescent plan <spec> --probe/agentdescent plan <spec> --probe. No model name is guessed. The line still must not recommendevolve. - Pre-stage failures (unknown algorithm, kind mismatch) stay as they are; only the post-write retry line changes.
- MCP
algorithm_speckeeps inheriting that payloadnexton the failed path.
Suggested fix
- In
agentdescent/cli.py(algorithms_run_payload), setretry_line = f"agentdescent plan {out} --probe". - Update the pins in
tests/test_cli_algorithms_run.pythat currently expect the short form, and assert the short form is gone. changelog.d/<n>-algorithms-run-retry-probe.md.
No change to the plan-refusal behaviour itself, and no change to the successful algorithms run / algorithm_spec next lines.
Acceptance
algorithms runthat writes a spec and then failsplanprintsnext: fix <spec>, then agentdescent plan <spec> --probe, and--jsonnextisagentdescent plan <spec> --probe.- The same
--jsonnextis what a failed MCPalgorithm_specreturns. pytest -q -o addopts='' tests/test_cli_algorithms_run.py tests/test_first_run_caps.py tests/test_mcp_algorithm_spec.pypasses, including the updated pins.
Activity