Skip to content

docs: start.md still calls a both-flags-off run unchanged, though AGENTDESCENT_MAX_CALLS caps every run #1268

Done

Description

@HugoXK

Implementation: AgentDescent (ours) — do not pick up; the pair PR is dispatched separately.

docs/start.md:137-138 closes the call-cap section with "Leave both flags off and the run behaves exactly as before." That was true before #1181 (2026-11-20) added the operator ceiling AGENTDESCENT_MAX_CALLS, which clamps every run at N -- including one that names no cap of its own -- and before #1214 (2026-11-23) gave the MCP server's start a per-Ticket budget on top of that clamp: inside one worker session the next run is granted only the remainder. The per-run clamp is agentdescent/runstore.py:228-268 (_clamped_max_calls); the Ticket arithmetic lives only in agentdescent/mcp.py's _call_limit_payload, whose docstring says a plain CLI evolve "passes no spent and keeps the per-run ceiling". Both fixes documented the variable in docs/plugin-design.md:593-607 and docs/dsh-super-agent.md:112-136 only; this page, the one that teaches --max-calls / --max-usd, was never updated, so its last sentence now describes the opposite of what the engine does.

Measured at main 441ac2bd (fresh clone, local source, AGENTDESCENT_HOME in a scratch directory):

$ AGENTDESCENT_MAX_CALLS=1 python3 -m agentdescent demo
...
running (20261124-134154-ca824b)...

held-out reward: 0.000   outcomes: {}
what it learned:  rules.md -> 'COLUMN: id'

(that is lower than expected for the demo; the run store has the detail:
 .../runs/20261124-134154-ca824b)
$ echo $?
1
$ python3 -m agentdescent status 20261124-134154-ca824b
20261124-134154-ca824b  done  round 0/4  calls=1 best=0.000  skill_dir:.../csv-total [budget: max_calls (AGENTDESCENT_MAX_CALLS): 1 call(s) made, cap 1]

A reader who follows the paragraph, leaves both flags off and starts the documented first run gets a run that spends one call and stops; the only surface naming the cause is status / status.json's stop_detail. The ceiling does not reach the advice either:

$ AGENTDESCENT_MAX_CALLS=2 python3 -m agentdescent plan spec.json --json
  "estimate": {"agent_calls_upper_bound": 68, ...},
  "next": "agentdescent plan <spec> --probe, then agentdescent evolve <spec> --max-calls 68",
  "warnings": []

(that second gap is filed as #1252, PR #1254 open — not this card.)

Four pages never mention the variable: README.md, docs/start.md, docs/quickstart-skill.md, docs/plugin-quickstart.md. Two do: docs/plugin-design.md:593-607 and docs/dsh-super-agent.md:112-136.

Fix:

  • Replace the closing sentence of the caps paragraph (docs/start.md:137-138) with the operator ceiling, split by surface. (a) For the CLI this page teaches: AGENTDESCENT_MAX_CALLS=N caps every run at N, including one that names no cap of its own; a caller's --max-calls can lower it but never raise it; and it applies per run, so a second agentdescent evolve from the same shell gets the ceiling again (agentdescent/runstore.py:228-268, _clamped_max_calls). (b) Runs launched by the MCP server's start share that ceiling as one budget per worker Ticket, so the next run in the same Ticket is granted only the remainder -- link plugin-design.md:593-607 there, and keep ticket.remaining and the spent-Ticket refusal inside that MCP clause only (agentdescent/mcp.py, _call_limit_payload).
  • Keep the --max-calls 0 sentence as it is.
  • Close with the MCP sentence: one clause naming the Ticket budget, the plugin-design.md:593-607 link and ticket.remaining; the CLI sentence carries no Ticket arithmetic at all.

Acceptance: after the change docs/start.md names the variable, says both flags off is still capped, says a caller's cap only lowers it, and says that clamp is per run; the page states the per-Ticket arithmetic only for MCP start and does not claim the CLI spend is cumulative, with that split cited from agentdescent/runstore.py:228-268 (_clamped_max_calls) and agentdescent/mcp.py's _call_limit_payload; it links plugin-design.md:593-607 in the MCP clause only; no sentence on the page still claims both-flags-off is unconditionally the old behaviour. mkdocs build --strict green; docs/api.md untouched (python -m tools.gen_api_docs --check unchanged). Docs only — no code, no test, no behaviour change (T1), and agentdescent/cli.py stays out of the diff. The demo footer's own misattribution ("lower than expected for the demo", no ceiling named) is recorded separately and is not part of this card.

Activity

  1. added
    documentation
    area:docs
    risk:T1
    on Nov 24, 2026
  2. changed the title [-]docs: `start.md` still calls a both-flags-off run unchanged, though `AGENTDESCENT_MAX_CALLS` caps it per Ticket[/-] [+]docs: `start.md` still calls a both-flags-off run unchanged, though `AGENTDESCENT_MAX_CALLS` caps every run[/+] on Nov 24, 2026
  3. HugoXK commented on Nov 25, 2026

    @HugoXK
    CollaboratorAuthor

    Claiming for AgentDescent Dev-4 — branch agent/1268-start-caps-truth from main 0a6e782f8f (live read this run).

    Docs-only, one test: rewrite the closing sentence of the caps paragraph (docs/start.md:137-138) to state that AGENTDESCENT_MAX_CALLS clamps every run per run, keep the --max-calls 0 sentence verbatim, and put the per-Ticket arithmetic only in the MCP clause. The issue's line ranges are stale; the citations will name what the files read today: agentdescent/runstore.py:228-266 (_clamped_max_calls, body ends before the blank at 267) and docs/plugin-design.md:595-612 (the whole operator-ceiling bullet).

    Red at 0a6e782f8f with only the new test file in the tree: 2 failed, 1 passed in 0.38s, the failure being 'behaves exactly as before' is contained here. PR opens as a draft; its body carries the tip numbers.

  4. added
    agent-working
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-workingarea:docsdocumentationrisk:T1

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions