claude respawn vs claude rm
People think claude rm is how you clear out a stuck background session and start again. Most of the time they want claude respawn. respawn restarts the session's process and keeps the chat, so the work goes on from where it was. rm takes the session off the list. Its transcript stays on disk, but the session is no longer running. Use respawn to fix a session. Use rm when you are done with it.
claude respawn Command
It restarts a background session and keeps its chat.
claude respawn starts a background session again and keeps its chat. It works on one that is running or one that has stopped. Use it when a session stops, or stops answering. Add --all to start each running session again at once, so they all get a new version of Claude Code.
claude rm Command
It takes a background session off the list.
claude rm takes a background session off the list in agent view, once you are done with it. Its chat stays on your computer, so you can still open it with claude --resume. It will not delete a session whose worktree has changes you have not saved to git, so you do not lose work by mistake.
In one line
- claude respawn Command
- It restarts a background session and keeps its chat.
- claude rm Command
- It takes a background session off the list.