Agent workflows need three budgets, not one
A token cap alone cannot bound an autonomous coding task. Combine token, turn, and time budgets with explicit evidence and action limits.

Agent workflows need three budgets, not one
Giving a coding agent a token limit feels like control, but tokens are only one dimension of autonomy. A task can remain under its token allowance while consuming too many turns, waiting too long, or repeatedly making no useful change. The practical unit to manage is therefore not “one prompt.” It is a bounded work loop with an observable outcome.

What the sources establish
Qwen Team’s September 17, 2026 product update says Qwen Code v0.23.3, v0.23.4 and v0.24.0 added named workflows, per-turn token caps, and Goal limits for turns and active time. It also says a Goal receives one wind-down turn after a limit is reached. These are vendor-documented capabilities, not tests performed by this site. The current Goals documentation, checked October 12, further explains that token, turn and active-time windows are separate; whichever limit is reached first stops the loop after a handoff turn. It also warns that a time limit is checked between turns, so an already-running turn is not interrupted.
That distinction suggests a general design pattern for any agentic coding system:
1. Token budget limits model consumption. 2. Turn budget limits repeated attempts. 3. Time budget limits how long the loop may occupy a worker or a developer’s attention.
A fourth boundary belongs outside those meters: action scope. State which files may change, which checks must pass, and which irreversible actions—such as pushing, deleting, deploying or publishing—are forbidden without human approval.
Define evidence before autonomy
A strong objective describes a state that another person can verify. “Improve checkout performance” is weak because the agent can declare success without a shared threshold. A stronger version is: “The benchmark exits 0 and prints p95 below 250 ms; the test suite exits 0; do not change the benchmark or skip tests.” Qwen’s Goals documentation uses the same structure: outcome, binary completion checks, forbidden actions, budget guidance and a blocker report.
This matters because an agent cannot prove a file changed or tests passed merely by saying so. The evidence should be a recent tool result: a test exit code, a benchmark line, a diff, or a readback from the target system. A human approval must likewise be an actual human message, not an assumption.
Put a check between two steps
- Define
Input and acceptance criteria
- Produce
One inspectable unit
- Verify
Behavior and evidence
- Decide
Accept or revise
A small budgeting model
Use this planning equation:
maximum exposure = turn cap × maximum tokens per turn
This is a ceiling, not a forecast. Suppose a maintenance task allows 8 turns and 40,000 tokens per turn. The theoretical ceiling is 320,000 tokens. If the active-time cap is 25 minutes, whichever boundary is reached first ends the loop. These numbers are a self-designed example, not Qwen pricing or a benchmark.
Then add two operational rules:
- After two consecutive turns with no measurable progress, require a different approach or stop as blocked.
- Reserve the last turn for a handoff containing the latest evidence, changed files, remaining risks and the exact decision needed from a person.
The point is not to make agents timid. It is to make failure finite and reviewable.
Practical exercise
Choose one reversible repository task, such as adding input validation to a single endpoint. Write an objective with five fields:
- Outcome: the behavior that must become true.
- Done when: two binary checks, including one command and expected output.
- Must not: files and irreversible actions outside scope.
- Budget: 6 turns, 20 minutes, and a per-turn token ceiling appropriate to your tool.
- On block: the evidence to return and one decision a human may need to make.
Run it only in a branch or disposable workspace. Record each turn as progress, retry, or blocked. The exercise succeeds if the final report contains the named evidence and stays inside all three budgets—even if the code change is not completed. That outcome is checkable without claiming this site performed the experiment.
Sources: Qwen Code Weekly, September 17, 2026 ↗ and Qwen Code Goals documentation, checked October 12, 2026 ↗.
Understand it. Then try it.
Read something elseNo sign-in needed. One like per browser, across all languages.
Original references
Use these links to verify details and learn more. A reference does not imply endorsement.
qwenlm.github.ioReference 1qwenlm.github.ioReference 2