Skip to main content
This setting is only supported for Claude models.
Controls how aggressively Claude manages conversation context by pruning conversation history when LLM token limits are reached. This setting allows you to balance cost optimization against context preservation for longer conversations.

Syntax

Properties

object
An object that contains various AI settings. See ai_settings for more information.

Behavior

Leaving conversation_prune_length unset, or setting it explicitly to max, raises the pruning trigger on an Omni-managed LLM with a 1M-token context window (Claude or GPT):
  • History trims down to about 100,000 tokens. Claude keeps up to about 550,000 tokens before trimming, and GPT keeps up to about 175,000 tokens.
  • An idle chat or a changed prompt prefix can trigger an earlier trim once the conversation passes about 125,000 tokens.
  • Setting conversation_prune_length explicitly to short, medium, or long opts out of this raise and keeps the thresholds in the table above.

Examples

Optimize for cost with aggressive context pruning
Balance cost and context preservation
Preserve maximum context