Video yükleniyor...
Video Yüklenemedi
I got curious how compaction works as a PM, so I did some brain surgery on Claude Code: (Anthropic's been doing really interesting work on context editing - they showed Claude Opus playing Settlers of Catan for 75+ minutes in a single thread by constantly editing the context instead... show more
58,082 görüntüleme • 8 ay önce •via X (Twitter)
24 Yorum

Super interesting deep dive! We wrote a post about some of the different techniques available for compression/compaction:

i feel seen

context compaction is the quiet superpower nobody talks about. ran a 4 hour coding session with claude code yesterday. zero context resets. the surgery is worth it.

nice deep dive! :) intelligent offload + search rightly gaining pretty popular in ai engineer circles, exciting times to be building search for agents

If you get a chance, try this out:

You might want to check out my Claude-central open source project. It leverages those history files to create a command and control site for your Claude projects, gives you easy access to all of your history and sessions, and also shows you live when Claude needs your input.

Great findings! But the question is...does it UTILIZE the copy of the uncompacted conversation post-compacting to extract forgotten details? Here's a brief summary I wrote up of my context management system I built which attempts to ensure post-compacted chat log is utilized - curious to hear what you think:

This is great, thank you. I won't tell you the hoops I've been jumping through in my fear of compaction! Have you seen what happens when Claude hits an API error due to running out of context and becomes irrecoverable? Seems to have gotten better lately, but def nightmare fuel.

But surely it can't then use what's before the compaction boundary... or context wouldn't then be compacted (it'd be enlarged in fact!)...

When compacting, the Gemini CLI also saves the original chat messages. the key matter is whether these original messages are effectively utilized in subsequent sessions. From what I see, Gemini CLI only uses the compacted summary when organizing context for next chat and doesn’t go back to read the original messages as needed. Correct me if I’m wrong. @ntaylormullen @LyalinDotCom @geminicli

Thank you. (via @bentossell ) I've shaped a command to look across Cursor/Codex/Claude Code at recent activity and summarize

Yes. It also does many interesting things, like microcompactions on every API call, or filtering thinking to not send it to API either. But I still think it could be done better. So I'm diving deeper...

awesome work tal, this is gold

Context editing for long-running AI tasks is fascinating! This shows how to ship complex features fast.

Glad to see people finally looking under the hood at how that state is actually managed!

The "everything is text files" foundation is exactly right. The next layer is retrieval: you can grep your history, but you still have to know what to look for. The jump from keyword-searchable session files to semantically-indexed memory that surfaces relevant past decisions automatically — without knowing the right search term — is where agent continuity gets genuinely interesting.

I loved this!!

If the new LLM instance with the compressed context revisits the old file, does it then have to recompress everything again with the info it needed included?

context editing feels like time travel for code. wild how a little surgical memory swap can keep the conversation alive way past the usual limits.

the compaction happens on the server side, those JSONL files are just logs

wait this is actually fascinating

I'm intrigued by Anthropic's approach to context editing. It showcases the evolving techniques for dealing with the limitations of context windows, and I'd like to learn more.

Wow

Here to say thank you for the tip on that jsonl extension that is CLUTCH Also hey stranger good to see ya on the interwebs
