Skip to main content
Output continuation lets an agent transparently finish a long answer the model cut off at its output-token limit.

Quick Start

1

On by default

2

Raise the cap

3

Turn it off

4

Pair with a low max_tokens


What the User Sees

The user gets one complete answer and never has to type “continue”.

How It Works

The agent keeps a per-turn counter and stitches each piece onto the accumulated text.

When Continuation Is Skipped


Value Shapes

output_continuation is a field on the existing ExecutionConfig, not a separate Agent(...) parameter.

Configuration Options

ExecutionConfig API Reference

Full ExecutionConfig options

Common Patterns


Best Practices

The common failure is a half-finished answer the user has to re-prompt. The default cap of 3 covers it.
output_continuation=1 keeps one safety net without large extra token spend.
max_steps caps the tool-use loop; output continuation caps single-answer overflow. They are independent.
Continuation is skipped for JSON/schema outputs, so give those calls enough max_tokens up front.
Set output_continuation=False to assert on last_stop_reason == "length_truncated" without extra model calls.

Execution Config

All execution options

Run Outcome

The length_truncated outcome

Agent Run Outcomes

last_stop_reason values

Turn Completion Notes

Note shown when the cap is exhausted