If a reply hits the max_tokens limit, what happens?

It is cut off, maybe mid-sentence or even mid-word.

Start playing free

  1. It is cut off, maybe mid-sentence ✔
  2. The model rewrites it to fit
  3. The API returns an error and no text

Why: max_tokens is a hard stop, not a request to be brief. The model does not plan its answer around it, so if you want short replies, ask for them in the prompt.

Huh, didn't know that: Asking for a number of sentences or paragraphs works better than an exact word count, because models count tokens, not words.

The dad joke
I set max_tokens on my uncle's stories. Now they just stop in the middle of the best p
Like this card?
Play the game

References

Answer: It is cut off, maybe mid-sentence. max_tokens is a hard stop, not a request to be brief. The model does not plan its answer around it, so if you want short replies, ask for them in the prompt.

  1. Claude API Docs: Reducing latency platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/reduce-latency
    the response will be cut off, perhaps mid-sentence or mid-word, so this is a blunt technique
    Checked 2026-10-10.

Think this answer is wrong? Tap "Challenge this answer" on the card in the game and tell us why.

Test yourself in the game