Agent Context Window Simulator (What Survives Truncation)

See which messages an LLM would still see when the context window overflows.

Use the tool

Why this tool exists

Long conversations and agent loops overflow the context window, and what gets dropped decides whether the agent forgets the user's name or its own instructions. Paste your messages (JSON or role: text lines), set the window and the reply reserve, and choose a strategy: drop the oldest, keep the system message plus the most recent, or also keep the first user message. The tool shows each message as KEEP or DROP with estimated tokens and lists what the model will no longer see.

Token counts are estimates (about 4 characters per token plus framing); use the tokenizer tools for exact figures for your model. It is a planning aid for memory design: pin key facts in the system prompt or a summary.

How to use it

  1. Paste the conversation as JSON or lines like "user: ...".
  2. Set the window size, reply reserve and strategy.
  3. Check what is dropped and move critical facts into pinned messages.

Frequently asked questions

Are the token counts exact?

No, they use a 4 characters per token estimate.

What does reserve mean?

Tokens kept free for the model's reply.

Which strategy is best?

Keeping the system message and recent turns is the usual default; add summaries for long tasks.