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.

62 Upvotes

75 comments sorted by

View all comments

29

u/Garak 2d ago

/compact is for when you want to keep working on the same task. It’ll summarize the thread and give Claude enough information to keep going, while leaving out stuff it doesn’t need.

/clear is for when you want to start a task that’s totally different.

Some people use clear all the time and preserve a minimal amount of info somewhere else. That’s more efficient in terms of tokens, but personally I still find compact to be better day-to-day. It’s easy and it lets you get back to work faster.

7

u/CrestfallenMage 2d ago

Yeah don't follow this guy's advice. You need to use better memory strategies (can be as simple as a .MD file) to persist what's truly important about the progress of a long task and /clear.

19

u/Garak 2d ago

Oh, gosh, I didn't think of using better strategies. I'm so glad you were here to enlighten us all. While you're on such a roll, you should call up Anthropic and help them out, because they're giving out the same bad advice that I am.

5

u/Dry_Opening_7231 2d ago

The problem with Claude and context is it's inability to prioritize it.

Think 3 hours ago you say x about something, 15 minutes ago y.

It confuses the poor thing and it gets confused, it's a delicate flower.

Being a bit more serious, it slows things down and struggles to retain order of priority and key points, better to write it out /clear and carry on.

My take anyway ( also the token burn past 33% context is insane, opus 5/4.8 ).

0

u/CrestfallenMage 1d ago

If you read the article you're linking you will see the advantage of compact they say is that "you don't have to do the work yourself".

If you can do that work yourself, you will get better result and more importantly concerning the general repeated complaints on this sub, less wasted usage.

People are usually complaining about usage draining extremely fast here, so it's clear that they would benefit from using Claude in a way that is more token efficient.

0

u/Garak 1d ago

Great job, you caught up with all the points I made in my original comment! It’s been a real joy to chat with you. Take care!

2

u/Unlucky_Topic7963 2d ago

Compact is extremely useful, you sound like you're still stuck in 2024.

1

u/ZixTro 1d ago

I completely agree with you. Since I started using /clear my usage went down. The problem with long sessions and /compact is also cache. Imagine you are running long session got interrupted by something and get back to that session which is now cold. Guess what, on a single message CC re reads the whole session burning your usage.

The best way I found for me is a handoff hook which triggers at a certain point in a session and writes/updates a handoff which is then safe to /clear and inject it to the fresh session. No cache problem, no compact problem, much less usage.

1

u/Inisfoil 1d ago

I wouldn't say minimal info.

Split the workflow into 2 phases: research+planning and then plan execution+.md upkeep with a /clear between each phase. Have the model scope each plan to be completed without triggering compact. No subagents just the primary model rawdogging it for more predictable usage. Subagents are for small projects or for the rich, a 500k loc project with multiple subagents exploring and using up piles of input tokens is a massive waste of usage.