How to Restart Claude Code (and When You Actually Should)
Engineering
How to Restart Claude Code (and When You Actually Should)
Sometimes the fastest way forward in Claude Code is backward: end the current session and start clean. Here's every way to restart — and, more importantly, when a fresh session beats nursing the one you've got.
The ways to restart
From lightest to heaviest:
/clear— wipes the conversation context and gives you an empty window in the same directory. YourCLAUDE.mdreloads automatically. The fastest reset; the old transcript is saved to disk (resumable), so you're not losing it, just setting it down./compact— not a full restart, but a soft one: it summarizes the conversation and continues, freeing space while keeping the thread.- A brand-new session — quit and run
claudeagain. Note: quitting doesn't destroy anything — sessions save continuously to disk — so a genuinely fresh context means/clearor simply not resuming the old one. claude --continue— the opposite of a restart: resumes your last session right where you left it.
What survives every restart: your files, git, and CLAUDE.md. What doesn't: the in-context reasoning. (Full breakdown: /clear vs /compact vs kill.)
When you should restart
Restart when the context has turned into a liability, not an asset:
- It's looping — re-reading files, re-trying the same failed fix. (Why restarting beats debugging →)
- A wrong assumption anchored early and now steers everything.
- You've corrected the same thing twice and it came back a third time.
- You're switching tasks — don't let task A's context bleed into task B.
- The window's bloated and every turn is slow and expensive. (Why sessions burn tokens →)
The tell: when your job becomes managing the confused agent instead of shipping the feature, restart.
Restart well — don't just reset
A restart without a better opening line just puts you back at the start. Spend the one thing you earned in the dead session — knowledge — on the new one's first prompt: "We're adding X. The last attempt failed because Y. Start from that constraint." A clean session that opens with the lesson clears in two turns what the old one couldn't in ten. (The full philosophy: shoot your Claude Code in the head.)
Across many sessions
Restarting one session is easy. The harder version: knowing which of your five running sessions needs it. Mwah floats each live Claude Code session on your desktop as a robot flagged ALIVE or STUCK, so the one that needs a restart is obvious — and ending it is one click.
Related: /clear vs /compact vs kill · Stuck in a loop?
Keep reading
View all dispatches →Shopify AI Agent Tools: What Your Agents Can Actually Do in Your Store
Clearly now ships Shopify store tools your AI agents can call — browse the catalog, read orders, roll up revenue, edit products, and attach generated images — over MCP and the beehaven CLI, with a dry-run preview on every write. Here are the tools, with example commands.
How to Manage Your Shopify Store with AI Agents
AI agents can now do the work of running a Shopify store — writing descriptions, generating product images, answering customers, updating the catalog. Here's how agent-run commerce works, and how to set it up.
Claude Code for Shopify: Run Your Store from Your Terminal
If you already run your codebase with Claude Code, the same agents can run your Shopify store — edit the catalog, generate product images, answer customers — with a connector and the right guardrails. Here's the setup.