Problem
When adding or modifying MCP server configurations in ~/.claude.json, users must manually:
- Quit Claude Code (
/exit or Ctrl+C)
- Run
claude --resume
- Select the most recent session from the list
This is a friction-heavy workflow, especially when iterating on MCP server setup or debugging connection issues.
Proposed Solution
Add a built-in /restart command that:
- Saves the current session ID
- Re-execs the Claude Code process with
--resume <session-id>
- Automatically reconnects to updated MCP servers
Example Usage
> /restart
Restarting Claude Code...
[Claude Code restarts and resumes the same session with refreshed MCP connections]
Alternatives Considered
- Shell aliases/wrappers: Work but are external workarounds that don't preserve session context seamlessly
- Custom skills: Cannot restart the parent process from within
Additional Context
This would significantly improve the developer experience when:
- Setting up new MCP servers
- Debugging MCP connection issues
- Switching between MCP configurations
- Any scenario where MCP servers need to be reloaded
Environment
- macOS (though this would benefit all platforms)
- Claude Code CLI
Problem
When adding or modifying MCP server configurations in
~/.claude.json, users must manually:/exitor Ctrl+C)claude --resumeThis is a friction-heavy workflow, especially when iterating on MCP server setup or debugging connection issues.
Proposed Solution
Add a built-in
/restartcommand that:--resume <session-id>Example Usage
Alternatives Considered
Additional Context
This would significantly improve the developer experience when:
Environment