← sources

When to use /compact, when to use /clear

source: reddit (reddit:ClaudeCode)published 2026-10-27 16:48ingested 2026-10-28 02:38

retained text

I have unfortunately experienced situations where I was busy with other tasks and Claude Code automatically executed \`/compact\`, only to complain later that important details had been lost as a result.

So, what is the right time for the two commands?

document fetched 2026-10-28 00:40 · canonical https://reddit.com/r/ClaudeCode/comments/1xgxsis/when_to_use_compact_when_to_use_clear