AI answer in your app cuts off mid-sentence? Check max_tokens
Ship ItChecked against the official source
Source checked 10 Oct 2026 · Published 23 Oct 2026 · Last reviewed 23 Oct 2026 · By Ctrl+Z Therapy (how we test)
The short answer
Every AI API call has an output limit you set in the request. Claude calls it max_tokens: when the answer reaches it, Claude simply stops, and the stop reason is max_tokens. OpenAI's reasoning models return a response with a status of incomplete instead. Claude's docs advise: "Raise max_tokens or continue the response."
What to do
- Log why each answer stopped: the stop reason max_tokens on Claude, or a status of incomplete on OpenAI's reasoning models.
- If the answer hit the limit, raise the limit or continue the answer instead of showing half of it.
- Ask your AI tool: "Find every AI API call in this app. Log why each answer stopped, and if it stopped because of the token limit, raise the limit or offer a 'continue' button instead of showing half an answer."
Good to know
- On OpenAI's reasoning models, this can happen before any visible text: "you could incur costs for input and reasoning tokens without receiving a visible response."
- OpenAI recommends reserving at least 25,000 tokens for reasoning and outputs when you start experimenting with those models.
- For very large limits on Claude, use streaming.
Source
Checked on 10 Oct 2026. Prices, limits and settings change, so check the source before you rely on them.