How does /summarize actually work?

Hi,

Please can somebody help me to understand what /summarize is doing? I’m using it often and want to better understand so I’m not mis-using it.

Is it creating a summary of the entire conversation that is then hidden but read by the LLM moving forward? Or is it removing all the tool call results from the context window?

Thanks

Jack

Hey Jack. Short answer: it’s your first option. /summarize creates a summary of the whole conversation that the model will see next, it doesn’t just cut out tool call results.

A bit more detail on what happens:

  • /summarize manually triggers the same compaction that runs automatically when the chat gets close to the context limit. The difference is it runs right away and compresses the entire conversation. The automatic version keeps your most recent messages as-is, but /summarize doesn’t keep the tail.
  • The summarization model reads the entire conversation, your messages, the assistant replies, and all tool calls plus their results, then writes a structured summary (task and intent, key technical details, touched files, errors and fixes, remaining tasks, current step, etc.).
  • Then the model context is rebuilt: system prompt + that summary as a hidden message. Everything else, including tool results and older messages, is removed from what the model sees going forward.
  • The visible chat transcript doesn’t change. You’ll just see a marker that the context was summarized. Only what gets sent to the model changes.

So it’s not “deleting tool results” specifically. Everything up to the summarization point is replaced with a summary. The process is naturally lossy: small details that don’t make it into the summary drop out of the model’s working context, and you can always restate or reattach them. So it’s best to run /summarize at natural task boundaries, not in the middle.

Let me know if anything’s still unclear.

Thanks for the info. Please get this documented on the /docs site with a detailed structure of what is summarised.

For anyone reading who wants to know exactly what it does and what the ‘etc’ is: Summarise, fork the chat and ask the agent to give verbatim the summary. There is quite a lot of information in there including every message sent by the user.

Glad it helped. I agree this is missing from /docs right now, I’ll pass it to the docs team as a request to document /summarize, including a breakdown of what ends up in the summary. I won’t promise timelines, but the feedback is going to the right place.

And thanks for the tip about forking the chat and asking for a verbatim summary. It’s a really handy way to see exactly what made it into context. I think other users in the thread will find it useful too.

If anything else comes up about /summarize, feel free to reach out.