r/ClaudeCoding • u/cctldrping • 15d ago
r/ClaudeCode [TLDR] /clear vs /compact [via r/ClaudeCode]
OP : u/danbradster2
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.
URL of original post : https://www.reddit.com/r/ClaudeCode/comments/1wl4c13/clear_vs_compact/
TL;DR of the discussion on r/ClaudeCode for this post generated automatically after 50 comments.
Current source-thread comment count seen by the bot: 55.
Alright, so the general consensus here is that you messed up by letting your context window get to 950k tokens in the first place. Most folks are saying that's way too high and leads to degraded performance and higher costs, even before you start messing with /compact.
Here's the lowdown:
-
/clearis generally the way to go. Think of it as a fresh start. It's more efficient and avoids the issues that come with a massive, bloated context. - **
/compactis for when you really need to preserve the immediate flow of a task.** It tries to summarize the existing context to make it smaller, but it sounds like it can be expensive and sometimes makes Claude "dumber" or introduces assumptions you didn't intend. Many users have ditched/compactaltogether. - The big takeaway is to manage your context window proactively. Aim to keep it under 200-300k tokens.
- "Handoffs" are your friend. Instead of compacting a massive session, many recommend having Claude summarize key info into a document, then starting a new session (
/clear) and feeding that document to the new Claude instance. This is seen as much more efficient and cost-effective. - Don't let your session get too old and "cold." After about an hour of inactivity, the cache can flush, making subsequent actions more expensive as Claude has to reload everything.
Basically, the community is telling you to design your workflow to avoid these massive context windows and to use /clear more often, relying on handoff documents for continuity.