Compaction not happening soon enough

I’m not sure if this is a bug, but I’m using Opus 4.5 agent and after a while, of course, the context window fills up. In prior builds the context summarization would happen pretty soon near around 70-80%. But this time I ran up into the 90% mid action, and then at the end it’s showing 100% full!

It says the chat context is summarized there at the end of the conversation, but you can see the context hover item showing it’s still packed to the brim.

Hey, thanks for the report.

This is a known issue with auto-summarization. It can trigger late or incorrectly. The team is aware of it, and there are similar reports here: Composer-1 Unreliably Creates "Context Summary" After Hitting Token Limit

Workaround: try running /summarize manually when you see the context getting close to 70 to 80%. This should help avoid cases where the agent hits the limit in the middle of a task.

Can you share the Request ID from this chat (three dots in the top right > Copy Request ID)? It will help the team understand the specifics of your case.

Hey this seems to still be happening. I’m using Opus 5 Medium. I even told it to /summarize and it just gave me a written summary lol. Admittedly not sure if writing that command within a prompt with other instructions should work. I expect it to, but it definitely didn’t.

Anyways, the token pool has been growing for some time and it’s proceeding with implementation with no end in sight.

Request ID 3d788b31-ac02-475b-98bd-48d2c83f4e37

@Surrealblend That still sounds like the compaction trigger is arriving too late. For a clean check, try sending /summarize as its own turn (not mixed with implementation instructions) before the context is near the limit, then wait for the summary turn to finish before continuing. If it still keeps growing or reaches 100% mid-action, preserve the transcript/screenshots and attach request ID 3d788b31-ac02-475b-98bd-48d2c83f4e37 to Cursor support—the behavior is distinct from the model merely producing a written summary in response to ordinary prompt text.

Thanks @stonianua – i normally do do that when i’m task switching, but in this case I wanted to maintain as much detail as possible for the task at hand.

I expected the agent to run the summarization on its own before it hit 100%, which it usually does.

When it didn’t I tried this combo prompt, which to my surprise it also didn’t pick up on. Not sure if that’s expected behavior but the bigger issue is certainly the agent not compacting sooner on its own.

Hey @Surrealblend, thanks for following up and sharing the Request ID. Your screenshot confirms that Opus 5 Medium reached about 380.5K / 300K without automatic compaction. This isn’t expected, and we’ve added your report to an issue we’re tracking.

@stonianua is right that /summarize should be sent as its own message. When combined with other instructions, it may be interpreted as normal prompt text. For now, the safest workaround is to start a new chat before Context Usage approaches 300K.

Thanks to both of you for the details.

Hey @kevinn here’s another example that just happened. Possible it’s an Opus thing:
0fca9d36-2bd1-4832-a854-9808186b01e2

Context window before this prompt was roughly 20% (I had manually summarized prior to a major task, asked a few clarifying questions, then had it run to build the plan).


…

[context window now]

Here’s the same issue on my side: 14d7a982-cfe1-4d89-b547-633e296acca1

Hey @Surrealblend,

Thanks for sticking with this and for sharing the request IDs. The issue where chats with the 300K context option kept growing past 300K without summarizing has been addressed on our side, and the fix will be rolled out soon if it hasn’t been already. Nothing needs to change on your end.

Once it’s live, chats with 300K selected should summarize before reaching that limit, and a chat that’s already past 300K should summarize on its next message.

Could you give it another try and let me know if you still see the context growing past 300K?

cc @Sergei_Gasilov

So far so good @Colin ! Been seeing Claude summarize on its own over the last day prior to the 300K window. Thanks for fixing and following up!!