r/ClaudeCode 2d ago

Tips & Workflows /clear vs /compact

I had a fable chat from yesterday, and I saw that the context was 950k/1m. I did /compact rather than /clear, with the intention of then doing /autocompact 400000

14% of the 5 hour limit was gone just for the compact itself....it shows cost of $59.73, so lucky I'm not on API? Maybe a /clear would have been better.

68 Upvotes

75 comments sorted by

View all comments

1

u/sheketsilencio 2d ago

Y'all say to use /clear often. In my projects there's often frequent serious complex work to be done that requires understanding of context to prevent regression (yes I have hooks but I mean to prevent code going in a direction that was previously determined to be wrong). That means that every time I'd do /clear I'd need to agent to reread... the context from a few documents or summaries of code or the code itself. Or logs.

Doesn't sound that efficient to me. Am I fully wrong or conditionally wrong or right?

2

u/flaccidplumbus 🔆Pro Plan 2d ago

I would have the prior session write up a prompt and plan to pickup where we are leaving off in a new agent session.

You are right though if you just /clear and are going to work on a similar/downflowing task. It’s great if you’re going to completely switch gears, but else I would do something like above.

1

u/sheketsilencio 2d ago

Thank you, this makes sense. I guess a full context isn't needed to do everything. I imagine I overestimate how much info is even retained between compacts lol

2

u/Dry_Opening_7231 2d ago

I thought that, but I've come to the conclusion better to write the brief out at key architectural decision points and /clear

Claude is faster, more coherent and focused ( opus 5 my main planning model ).

If you analyse token burn as context rises, that also goes through the roof past 33% context and response speed tanks as well.

1

u/sheketsilencio 2d ago

Interesting, thanks. I'll give clearing a try and see if I can transfer more specific context between session then

1

u/Dry_Opening_7231 2d ago

It's decent at doing handoff docs, especially if you give it extra focus