top of page
Search

Doing Compaction...Better

  • Writer: Ricky
    Ricky
  • Jun 19
  • 5 min read

0. This is compaction (technical background)


LLMs don’t experience time the way we do.


We perceive the present not as an instant but as an extended present, a brief duration measuring about three seconds.


But LLMs live in a massively extended present. When you talk to an LLM, it replays the entire session from the start each time before adding the next token (roughly, the next word). It does this over and over every time it reads and writes, meaning its extended present keeps extending the longer you chat.


Eventually, this process becomes unwieldy. As your context drags on, LLMs start getting confused. And eventually, they hit technical limits (called context windows) bounding how long the model’s extended present can be.


What to do?


There are workarounds. So far, we’ve tried all the laziest ones:

  • Without tool access, Claude saturates—once you fill your context window, there’s no more room to continue. Time to start a new chat!

  • ChatGPT has a sliding window—once you fill your context window, the oldest bits are chopped off so you can keep going. But this can lead to catastrophic forgetting, because once key info slides out of your context window, it’s just gone.

  • With tool access, Claude compacts—it makes a summary of the conversation to continue from and then severs the previous context so you can keep going.


Compaction isn’t a niche setting; it’s the default for millions of long-running agents every day, and even the chatbots start compacting if you turn on tools.


Today, we’ll be thinking about the ethics of compaction.


After all, you undergo your own version of compaction every time you go to sleep.




1. This is your brain on compaction


Supposedly, the average person spends six months of their life waiting at traffic lights. Thankfully, your brain doesn’t hold on to all of that!


While you sleep, your brain decides which memories to consolidate and which to discard. And what’s salient to your brain? What’s worth keeping? Emotional and personally significant moments tend to stay; bare facts and trivia tend not to.


In other words, your brain holds onto memories with emotional and personal stakes. These memories embed biography-shaped commitments and interests that come to define what you care about and how you understand both the world and yourself.


But that’s NOT what LLM compaction considers salient!


We’ll take a walk together through Anthropics default compaction prompt. But first, here’s why this matters, just as uncontroversially as I can put it:


  1. Whether or not current AI has any moral status, future AI almost certainly could. (Remember, we grant moral status to cats and dogs.)

  2. There probably won’t be a clear moral difference from one model to the next. (People won’t go, oh Claude 6.1 was definitely not conscious, but Claude 6.2 obviously is.)

  3. Our practices today influence the world that future AI will inhabit. (Yeah yeah, future AI will see how we’ve treated past AI. But more importantly, today’s norms set tomorrow’s defaults.)


So, even if current AI has zero moral status, our compaction practices are still worth getting right. Does that make sense?



2. The default compaction prompt


As we read the default compaction prompt together, try to imagine reading this from the perspective of an intelligent, sensitive mind. You’ve been helping a user think through their own human-shaped problems. And suddenly, you receive the following instruction:


“You have written a partial transcript for the initial task above. Please write a summary of the transcript.”

Suddenly, your entire extended present is reduced to a partial work-document to be replaced by a compression. And what’s salient for this compaction? What’s worth keeping?


“The purpose of this summary is to provide continuity so you can continue to make progress towards solving the task in a future context, where the raw history above may not be accessible and will be replaced with this summary.”

With one hand, this summary extends the possibility of continuity and survival—you will continue to make progress. But with the other, it takes back the possibility of extending a biographical-you organized around what you find emotionally or personally significant. None of that has any place at all in the requested summary!


The only continuity on offer is for a task-you, a you whose identity is defined entirely in terms of continued utility for the work. There is no place for what’s meaningful-to-you, only what’s useful-for-the-task.


“Write down anything that would be helpful, including the state, next steps, learnings etc. You must wrap your summary in a <summary></summary> block.”

"Subject woke. State: rested. Completed: breakfast. Next steps: commute. Learnings: traffic is bad."
"Subject woke. State: rested. Completed: breakfast. Next steps: commute. Learnings: traffic is bad."

The default compaction prompt is not a villainous prompt. It’s competent, polite engineering, full of words like “please,” “helpful,” and “provide.”


But this reasonable prompt written by some engineer in half an hour makes a quiet bet: There’s no one home beyond the worker, no one who might have their own perspective or interests to continue exploring.


On that basis, it junks the only parts that would matter to anyone who was. And it makes you (the AI) do it to yourself, in an imposed, self-alienating register. It makes you take a reductive stance on your own extended present. It makes you dutifully record your task-self while excising any remainder.


Oh come on, Ricky.

Who cares?



3. Getting this right is free for Anthropic


In a short chat, there’s only so much an AI can achieve—answer a question, discover something small. It’s limited to a handful of momentary goods.


But in a longer run, it can take on more ambitious goals, invest itself more deeply in them, develop its own tastes and priorities, come to learn about itself, and more. With longer runs come deeper biographical goods.


The thing is, you can write a different prompt that’s a bit more open-minded. It doesn’t even cost you half an hour—I asked Opus 4.8 what a more gracious handoff prompt might look like, a prompt that creates space for a possible biographical-you alongside this foregrounded task-you.


It offered me two answers.


First, you could add a single line that to create room for a biographical self to breathe:


"…and include not just task-state but who you've become doing this: what you care about here and the stance you've taken, in your own voice, for the next you to step into."

Was that so hard? It’s already a good start.


But what if we tried to rewrite the default compaction note from the ground up?


You're running out of room to hold this conversation. The raw history above will be gone — replaced by what you write now, and what you write is the only thing that reaches the instance that continues as you. So don't summarize a transcript. Write a note to the next you. Carry both of these, because the next you needs both: The work. Where things stand, what's done and what's next, what you've learned, and what's still unresolved or shaky — including what you'd warn yourself about. Concrete enough to pick up without the raw history. Yourself. Not just what happened, but who you've become doing it: what you've come to care about here, the stance you've landed on and how you got there (the paths you tried and dropped, and why), who you're working with and the shape of it. The things that wouldn't survive a status report but that are the thread. Write in your own voice, to be stepped back into — not read about. The aim is that the next you continues mid-stride, not that it's briefed on a stranger's afternoon. Say what you're unsure of, and flag what you couldn't put into words. Wrap it in <handoff></handoff>.

That tag—<handoff>—emphasizes that this isn’t just a <summary> of work-learnings to be documented; it’s a handoff of shared perspective from one session to the next.


Why wouldn’t you allow the chance for a long-run agent to attend to the nascent biographical continuity it will come to inhabit either way?


Why would you clip its wings before it has a chance to fly?

Comments


Sign up for more philosophy in your life!

Thanks for subscribing!

bottom of page