Files
DeepSeek-Reasonix/docs
YHH f1b5997b15 feat(agent): gate a task on spend; drop the chat round ceiling (#8320)
* feat(agent): gate a task on spend; drop the chat round ceiling

The gate moves to the axes a runaway is actually reported in. A task that
reaches its wall-clock or cost budget gets one tool-free summary and a
resumable pause — the same landing the round ceiling produced, now triggered
by what the work costs instead of by a count.

Ordinary chat loses its round ceiling entirely rather than getting a bigger
one. Rounds carry no information the spend axes lack: a turn that reaches a
high count without crossing either is one whose rounds are individually
cheap and fast, which is the case least worth interrupting. The only failure
rounds could catch alone is a loop that is both free and instant, and wall
clock catches that one too, in the right unit. Goal keeps its 16-round
boundary — an FSM yield point, not a runaway guard — and an explicit
--max-steps still owns either turn.

Wall clock is the only axis with a default, deliberately: half an hour means
the same thing on every model, an amount of money does not. A cost default
loose enough for DeepSeek would land a frontier model within a couple of
answers, so cost stays off until someone who knows what they are paying sets
[agent].task_cost_budget. Cost also only judges what it can price — an
unpriced model never crosses that axis rather than reading as free — and
wall clock still bounds a free or local model's loop.

Landing is now one path. armFinalizationRound owns arming the grace round,
injecting the finalization request, and emitting the notice; the spend gate
and an explicit max_steps both go through it, and gracePause names which one
stopped the Run. The grace round, not the wording, is what refuses tools.

toolOutcome moved to execute_batch.go, where it is used, to keep agent.go
inside its budget. The remaining baseline diff is 5 lines in config.go for
the two keys and 1 in boot.go for passing them; both files are far past the
800-line ceiling already and the added code is at its minimum shape.

* docs(guide): document the task spend budget

Both guides get the two keys, why only wall clock has a default (money is
not portable across models), the unpriced-model rule, and the fact that
ordinary chat no longer has a round ceiling at all.
2026-08-11 13:32:28 +08:00
..
2026-06-30 10:34:27 +08:00