Skip to content

cli: algorithms run --probe success next still says plan --probe, unlike plan --probe #1301

Done

Description

@Birfy

What happens

On tip a52a2470 (0.11.0, after #1300), a successful agentdescent plan --probe already drops the preflight from next and names only the capped evolve (#1217):

next: agentdescent evolve <spec> --max-calls N

--json next is the same string, and --probe is not in it.

algorithms run --probe runs that same preflight on the spec it just wrote, but on success it leaves the flagless-run advice in place:

next: agentdescent plan <spec> --probe, then agentdescent evolve <spec> --max-calls N
"next": "agentdescent plan <spec> --probe, then agentdescent evolve <spec> --max-calls N"

Following that line probes a second time. _capped_evolve_next already accepts already_probed=True for this case; cmd_plan uses it, _cmd_algorithms_run does not.

A refused probe on this verb is already consistent with plan --probe (ok: false, ready: false, next is the repair, then: re-runs plan --probe). Flagless algorithms run should keep teaching plan --probe, then the cap.

This is the same leftover-surface class as #1217, now for the success path of algorithms run --probe.

Repro

Fresh clone of ThinkFlowLab/agentdescent at a52a2470. pip install -e ".[mcp]". Isolated AGENTDESCENT_HOME so this does not touch a real host tree. A reachable OpenAI-compatible endpoint (or a stub that returns 200) is enough for the probe to succeed.

agentdescent algorithms run gepa ./prompt.txt ./cases.jsonl --out spec.json \
  --model m --base-url "$STUB" --probe
# exit 0; probe ok
# next: agentdescent plan /abs/spec.json --probe, then agentdescent evolve /abs/spec.json --max-calls N

agentdescent algorithms run gepa ./prompt.txt ./cases.jsonl --out spec.json \
  --model m --base-url "$STUB" --probe --json
# "next": "agentdescent plan /abs/spec.json --probe, then agentdescent evolve /abs/spec.json --max-calls N"

By contrast, agentdescent plan spec.json --probe on the same spec already prints next: agentdescent evolve spec.json --max-calls N.

Expected

  • After algorithms run --probe writes a spec, plans it, and the probe succeeds, the human next: line and --json next should be agentdescent evolve <spec> --max-calls N only, the same string plan --probe already prints. No model name is guessed.
  • A refused probe on this verb stays as it is (ok: false, ready: false, repair next, then: agentdescent plan <spec> --probe).
  • Flagless algorithms run (no --probe) still names plan <spec> --probe, then the capped evolve.

Suggested fix

  • In agentdescent/cli.py (_cmd_algorithms_run), when --probe ran and succeeded, set obj["next"] with _capped_evolve_next(..., already_probed=True), matching cmd_plan.
  • Pin this in tests/test_cli_algorithms_run.py (human form and --json). The existing flagless-run pins stay.
  • changelog.d/<n>-algorithms-run-probe-next.md.

No change to the probe itself, or to flagless algorithms run / MCP algorithm_spec next lines.

Acceptance

  • algorithms run --probe that succeeds prints next: agentdescent evolve <spec> --max-calls N, and --json next is that same string, with no --probe.
  • Flagless algorithms run still names plan --probe, then the cap.
  • A refused algorithms run --probe still exits 1 with ok: false / ready: false and a repair next.
  • pytest -q -o addopts='' tests/test_cli_algorithms_run.py tests/test_first_run_caps.py tests/test_plan_probe.py passes, including the new pins.

Activity

  1. added
    bug
    area:cli
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:clibug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions