// 16 tips tagged "sessions"
When Claude starts referencing files you've since deleted, remembering old code you've already changed, or getting confused by contradictory instructions from a long session — type /clear to wipe the slate clean. Unlike /compact which preserves context, /clear gives you a true fresh start without restarting the CLI.
Closed a session and realized you weren't done? Pass --continue (or -c) when launching Claude Code to pick up exactly where you left off — same context, same files, same conversation history — without re-explaining what you were working on.
Long sessions eat through your context window as conversation history piles up. Type /compact to summarize the conversation so far and reclaim space — keeping Claude's understanding of what you're working on while freeing up room for more work.
While --continue picks up the last session automatically, --resume shows you a list of all recent conversations so you can choose which one to reopen — jump back into that debugging session from Tuesday or the refactor you paused last week.
When you close a Claude Code session and realize you need to keep going, launch with --continue (or -c) to resume the last conversation with full context — no need to re-explain what you were working on.
While --continue picks up your last session, --resume opens a searchable picker of all recent conversations so you can switch between parallel workstreams instantly.
Claude Code runs on 5-hour rolling windows that start from your first message — send a lightweight wakeup message at 6am to unlock three windows per day instead of two.
Start a new Claude Code session for each task rather than running 200-message threads — your context stays cleaner, your output stays consistent, and your rate limits stretch further.
The cleanupPeriodDays setting controls how long session transcripts are kept, or set it to 0 to disable persistence entirely.
The --name flag sets a human-readable session name at launch, making it easy to resume specific threads later.
The --continue flag loads your most recent conversation instantly, no session ID required.
Start a Claude Code session in your terminal and continue it on the web, or pull a web session into your local terminal with --remote and --teleport.