C
Docs

Context Window Monitoring

Track the agent's memory usage and understand context limits.

Overview

The agent has a finite "context window" — the amount of information it can consider at once. C3 provides real-time monitoring of context usage, helping you understand when the agent might start forgetting earlier parts of the conversation.

Understanding context usage helps you:

  • Know when to start a fresh session
  • Understand why the agent might forget earlier context
  • Optimize prompts for efficiency
  • Plan long-running tasks effectively

Context Indicator

The context indicator appears in the session toolbar as a circular progress ring. It shows at a glance how much of the agent's context window is in use.

Visual States

UsageColorMeaning
0-60%GreenPlenty of room, no concerns
60-80%YellowGetting full, consider context
80-100%Orange/RedNearly full, compaction imminent

Tap the indicator to see a detailed breakdown of context usage.

Token Breakdown

The detailed view shows how context is allocated across different categories:

System Prompt

Base instructions that define the agent's behavior. This is relatively fixed and typically uses around 3,000-4,000 tokens.

Tools Definition

Descriptions of available tools (Read, Write, Bash, etc.). Usually around 15,000-16,000 tokens depending on enabled tools.

MCP Servers

If you have MCP servers configured, their tool definitions add to context usage. The amount varies based on the servers you have enabled.

Messages

Your conversation history — both your messages and the agent's responses. This grows as the conversation progresses and is the primary variable component.

Autocompact Buffer

The agent reserves space (around 45,000 tokens) for generating responses. This ensures there's always room for the agent to reply.

Context Limits

Most models have a 200,000 token context window. With the buffer and system overhead, you typically have 130,000-140,000 tokens available for conversation history.

Managing Context

As context fills up, the agent automatically compacts older messages to make room. Here's how to manage this effectively:

Automatic Compaction

When context exceeds the limit, the agent summarizes older messages and removes detailed content. The summary preserves key information but loses specifics.

Start Fresh Sessions

For long tasks, consider starting a new session periodically. This gives the agent fresh context without accumulated overhead from earlier conversation.

Be Concise

Shorter messages use less context. When possible, be direct and specific rather than verbose.

Use Multiple Sessions

Instead of one long session, use separate sessions for different tasks. Each session has its own context window.

Automatic Checkpoints

Checkpoints are created automatically at key moments during your session. If compaction removes important context, you can rewind to a previous checkpoint to restore the earlier state.

Efficiency Tips

  • Reference by file — Instead of pasting code, ask the agent to read it
  • Summarize progress — Periodically ask the agent to summarize what's done
  • Clear instructions — Specific asks use less back-and-forth
  • Batch operations — Combine related requests when possible