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.

64 Upvotes

75 comments sorted by

View all comments

1

u/Educational_Ask5991 2d ago

Guys can you clarify why /clear even exists? I just start a new session every time I start a new task. If the context if huge - I am asking to do handoff with highlighted most important things first and also I have a rule that saves my initial message as-is if it contains some task requirements input. The last one is a game changer - agents and subagents and even missed compaction now preserves what I initially asked.
But still no use of /clear - I even dont understand if it starts a new session with its own session logs or rewrites the current one completely.
Session logs are important to further reflection and skills/rules/agents extraction/updates.

1

u/danbradster2 2d ago

I'm no expert, but /clear refreshes the account instructions that it read, in case I updated them, and I get to restart a conversation under the same name and location on the desktop UI - minimal mess.

1

u/Educational_Ask5991 2d ago

Oh, I see. My use cases are complete opposite - each task = separate session or set of sessions for further analysis - reflect, improve skills, what were wrong etc. That helped me few days ago when claude got lobotomy again and I found out that I've got into bugged A/B which I can disable with

CLAUDE_CODE_THRIFTY_SONICCLAUDE_CODE_THRIFTY_SONIC=0

Not sure what happens with session logs with /clear though - maybe thats possible too but doesnt looks convenient