Different from context rejectionThe partial assistant message is kept and turn/end records max-tokens.

Three ceilings. The smallest wins.

RequestmaxTokensWhat this conversation asks the route to permit.
ProviderOutput capabilityWhat the model server can generate.
ContextRemaining headroomWindow minus prompt, schemas, and reserve.
effective output = min(request cap, provider cap, context − prompt − reserve)

Follow the terminal signal.

01provider lengthgeneration ceiling reached
02partial message retainedcompletion anchor appended
03no truncated tool dispatcheffects stay bounded
04turn/end: max-tokensnot completed success

Route one occurrence.

output = request capConfigured ceilingRaise carefully or split the output.
prompt + output = contextHeadroom exhaustedCompact, shorten, or enlarge context.
below both valuesProvider capInspect server metadata and logs.
no output; request rejectedInput overflowUse the separate context guide.

Recover with a bounded next turn.

1Preserve the partial artifactDo not request the same long answer again.
2Name the missing scopeContinue only sections 4–5.
3Measure the next requestVerify cap, prompt, output, and reason.

Twelve regression gates.

  1. DeepSeek length maps.
  2. pi-ai length maps.
  3. Partial text persists.
  4. Truncated tools never run.
  5. Turn reason is durable.
  6. Later turn can complete.
  7. Explicit cap wins.
  8. Default provenance logs.
  9. Overflow stays distinct.
  10. Web names truncation.
  11. Headless is nonzero.
  12. Usage identifies ceiling.