How to Kill a Claude Code Process (the Clean Way)
Sometimes you don't want to interrupt Claude Code — you want it gone. The session's wedged, or it's off doing something you never asked for, and you need the process dead now. Here's the clean way, from gentle to forceful.
From gentle to forceful
- Interrupt first.
Escstops the current action;Ctrl+C(often twice) exits the session. This is enough most of the time — the process ends cleanly. - If it's truly hung, find and signal the process. Claude Code runs as
node(theclaudeCLI):pgrep -fl claudeto find it.kill <pid>sends SIGTERM (asks it to shut down).kill -9 <pid>sends SIGKILL (forces it) when it won't go — the nuclear option, no cleanup, but it always works.
- Rewind instead, if it's one bad edit. If the session's fine but it made one change you want gone, press
Esctwice to roll the files back to the checkpoint before that edit — you keep the good context and lose only the bad diff. (Killing throws away the whole session.)
The order matters: interrupt → SIGTERM → SIGKILL. Reach for kill -9 only when the polite options don't work.
The catch: unsaved work dies with it
Killing a session ends whatever it was doing. Anything not written to disk goes with it. That's usually fine — you're killing it because it went wrong — but know it before you pull the trigger. (When to kill vs. save: shoot your Claude Code in the head.)
Finding the right one to kill
The hard part isn't the kill command — it's finding which process when you've got five node sessions running and only one is stuck. pgrep gives you PIDs, not context; you end up guessing.
This is exactly what Mwah is for: it puts every live Claude Code session on your desktop as a labelled robot — real name, project, ALIVE or STUCK — and a headshot ends the actual process (SIGTERM → SIGKILL) for you. It's a kill switch with a face, so you never pgrep for the right PID again. Take the shot →
Related: Is your session stuck? · Run multiple sessions
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.