Retries runs that hit output-token limits instead of failing
An agent runtime now retries runs hitting output-token limits instead of failing, automatically scaling default limits based on model capacity.
A turn that hits the model's output-token limit without producing a usable tool call is now retried instead of failing the run. Reasoning or a large response could consume the whole output allowance before the agent acted, and a single `max-tokens` finish ended the run with the output-token-limit error. The runtime now retries up to three consecutive times, appending a reminder to respond concisely and split large work across tool calls; the counter resets on tool-call progress and at the start of each run, and exhaustion still fails with the existing error. Empty max-tokens responses — turns that spent the allowance with no visible output — take the same recovery path, and `turn-finished` is emitted before each recovery iteration so iteration events stay paired The default output allowance now scales with the model.
When neither a request limit nor a caller default is supplied and the model advertises an output limit, the gateway uses `max(32000, floor(maxOutputTokens * 0.3))` instead of a flat 32,000. The fraction can only raise the default, never lower it, so it changes nothing below roughly a 106,667-token model limit (a 128,000-token model goes from 32,000 to 38,400); the…
- github.comCline: SDK v0.0.85primary
- github.comCline: CLI v3.0.64
§ how this story moved
- primary — Cline — Releases publishes the launch post.
- Cline — Releases picks up coverage.