Hermes

"response remained truncated after N continuation attempts"

Last checked

Not this error? See all Hermes errors

Seeing the OpenCode version, "still truncated after two output token limit continuations"? That's a different setting: the OpenCode decoder

"Response remained truncated after N continuation attempts" is the retry-exhausted follow-up to a normal truncation. Hermes re-prompts the model to continue after hitting the output ceiling, but every attempt runs into the same limit while each partial answer refills the context window. Since v0.21.1 that limit lives on your model server, not in Hermes (HERMES_MAX_TOKENS is ignored). Raise the server's output and context limits, run /compress, and the response completes on the first pass.

Likely cause

This is the retry-exhausted follow-up to a plain truncation, not a separate fault. When Hermes hits the output ceiling mid-stream it automatically re-prompts the model to continue where it left off. Every retry runs into the same ceiling, which since Hermes v0.21.1 is your model server's own output default (Hermes no longer reads model.max_tokens or HERMES_MAX_TOKENS), and each partial answer is fed back into the context so the window fills faster. All attempts hit the identical wall and Hermes gives up.

The fix

  1. 1 Fix the root output limit, not the retry message: raise the output and context limits on your model server. Hermes v0.21.1 and later ignore model.max_tokens and HERMES_MAX_TOKENS, so delete those if they're still set.
  2. 2 On Ollama, raise the context (OLLAMA_CONTEXT_LENGTH, or num_ctx in a Modelfile) and num_predict so continuations have room.
  3. 3 Free the context the retries have been filling: run /compress or start a fresh session, then re-run the prompt. With a reasoning model, /reasoning low leaves more of the budget for the answer.
OLLAMA_CONTEXT_LENGTH=64000 ollama serve
Full guideHermes "Response Truncated": 5 Causes FixedEvery error, one pageHermes Agent error index

Hit a different error?

Paste any agent error and get the cause and fix in seconds.

Open the decoder

Frequently asked questions

How is this different from "response truncated due to output length limit"?

Same root cause, later stage. The output-length message is the first truncation; this one means Hermes already retried the continuation several times and every attempt hit the same ceiling. Fixing the output limit clears both.

Mine says 4 attempts, the docs say 3. Does the number matter?

No. The number is just how many continuation retries that Hermes build budgets, and it varies between versions. Whether it says 3 or 4, the meaning is identical: every retry ran out of room.

The message says "Try again" - should I just re-run it?

Re-running sends the same request into the same ceiling, so it usually fails the same way. Raise the model server's output limit (num_predict and the context length on Ollama) and clear the context first, then retry.

Does HERMES_MAX_TOKENS fix it?

Not on current Hermes. From v0.21.1 the Hermes docs say it no longer reads model.max_tokens or HERMES_MAX_TOKENS and tell you to remove them. The limit that matters is your model server's own output default.

Stop firefighting agent errors

Decoding errors one at a time is the manual version of what BetterClaw automates. Run your agents on a no-code AI agent platform with managed models, retries and config validation built in.

Free plan available · Pro $49/mo · BYOK · 7-day free trial