Skip to content

cli: successful init still says then: plan <spec>, omitting --probe that every other first-run surface names #1295

Done

Description

@Birfy

What happens

On tip 23b1b1eb (0.11.0, after #1294), a successful agentdescent init still ends with a next step that omits --probe.

algorithms run, a successful plan, the default / --kind / --algorithm demo footers, MCP demo.next, and the README / docs/start.md / docs/plugin-quickstart.md first-run blocks all name plan <spec> --probe, then evolve --max-calls <N>. init is the command those footers tell a new user to run, but its own follow-up does not:

wrote /path/spec.json
then: agentdescent plan /path/spec.json

--json is the same short line:

"next": ["agentdescent plan /path/spec.json"]

Following that line 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 evolve (or never, if the user also skips --max-calls). init cannot yet know N — it does not plan — but it can still name --probe on the plan it recommends, the same way the demo footer already does.

When --model / --base-url are omitted, the gap is sharper. init exits 0, warns that plan will refuse the placeholders, and then immediately prints then: agentdescent plan <spec> — the command it just said will fail. (algorithms run without the flags is better: next: fix <spec>, then agentdescent plan <spec>.)

This is the same leftover-surface class as #1217 / #1232, now for init's own then: / --json next (hardcoded in agentdescent/cli.py as report.append(("then", f"agentdescent plan {out}"))).

Repro

Fresh clone of ThinkFlowLab/agentdescent at 23b1b1eb. pip install -e ".[mcp]". Isolated AGENTDESCENT_HOME so this does not touch a real host tree. A 12-case text fixture (the packaged demo --kind text tree is enough).

agentdescent init ./prompt.txt --kind text --data ./cases.jsonl --out spec.json \
  --model m --base-url https://example.test/v1 --rounds 1 --workers 1
# exit 0; then: agentdescent plan /abs/spec.json

agentdescent init ./prompt.txt --kind text --data ./cases.jsonl --out spec.json \
  --model m --base-url https://example.test/v1 --rounds 1 --workers 1 --json
# "next": ["agentdescent plan /abs/spec.json"]

# the same short then: with --algorithm ace, and with --kind skill_library --algorithm evoskill

agentdescent init ./prompt.txt --kind text --data ./cases.jsonl --out spec-nomodel.json
# exit 0; warning that plan will refuse the placeholders
# then: agentdescent plan /abs/spec-nomodel.json

agentdescent plan spec-nomodel.json
# exit 2: agent.model / agent.default_base_url still '<your-model>' / '<your-endpoint-url>'

By contrast, the same target through algorithms run (which also plans) already names the preflight and the cap:

next: agentdescent plan /abs/spec.json --probe, then agentdescent evolve /abs/spec.json --max-calls 19

Expected

  • After a successful init that wrote a plan-ready spec, then: and --json next should be agentdescent plan <spec> --probe (optionally followed by evolve --max-calls <N>, with <N> from that plan). No model name is guessed.
  • When the written spec still has placeholders (or another condition plan will refuse up front), then: / next should name the repair (--model / --base-url, or fill the placeholders), not a plan that will exit 2.
  • policy_slot / missing-cases next: lines stay as they are; only the final then: plan line changes.

Suggested fix

  • In agentdescent/cli.py (_write_starter_spec / the follow_up == "plan" branch), append --probe to the then: agentdescent plan {out} line when the spec is plan-ready. If _starter_model_warnings fired, point then: at filling --model / --base-url (or editing the placeholders) instead of plan.
  • Update the tests that currently pin the short form: tests/test_cli_init_policy_slot.py, tests/test_cli_json_errors.py, and add a pin in tests/test_first_run_caps.py.
  • changelog.d/<n>-init-then-probe.md.

No change to the placeholder-refusal behaviour of init / plan. init still does not plan or guess a model.

Acceptance

  • agentdescent init … --model m --base-url https://example.test/v1 prints then: agentdescent plan <spec> --probe, and --json next contains that same command.
  • The same line appears for --algorithm and --kind skill_library.
  • A bare init without the flags still writes placeholders, still exits 0 with the warning, and no longer tells the user to plan that spec until the placeholders are filled.
  • pytest -q -o addopts='' tests/test_cli_init_policy_slot.py tests/test_cli_json_errors.py tests/test_first_run_caps.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