Tag

#error handling

1 post tagged.

Continuing a context window truncation returns a 400

Two stop reasons mean your response was cut off, and the continuation helper on Anthropic's own stop reasons page only handles one of them. model_context_window_exceeded falls out of the loop and is returned as complete. Adding it to the condition is worse: the continuation re-sends a full window as input, which is documented as a 400 on every model.

11 min read12