This is controversial, but I think it’s correct: if you’re using Claude Code and your context has reached the point you need to use /compact, you should probably just start over—in my experience you should really, really, really aim to one-shot your tasks.
The only valid exception to this is if you’re using Claude Code purely for exploration (e.g. “I’m onboarding and asking questions about the codebase”)—that’s the one time a /compact might make sense.