[Feature] Add /restart command
Is your feature request related to a problem? Please describe.
Currently, when working with Claude Code, there's no streamlined way to restart a session with a completely fresh context while staying in the same directory and process. Users must either:
- Exit Claude Code completely (
/exit) and restart it withclaude - Use
/clearwhich only clears conversation history but doesn't reload configurations - Start a new session in a different terminal
This becomes cumbersome when you need to reload configuration changes (MCP servers, plugins, .claude files) or want a truly fresh start during long development sessions.
Describe the solution you'd like
Add a new /restart slash command that provides a quick way to restart the current Claude Code session with a fresh context while staying in the same directory.
The /restart command should:
- Clear all conversation history (similar to
/clear) - Reset the session state
- Reload CLAUDE.md files and project configuration
- Reload MCP server configurations
- Reload plugin configurations
- Reload
.claudeconfiguration files (commands, agents, skills) - Maintain the current working directory
- Preserve user settings and permissions (e.g., if
--dangerously-skip-permissionswas used) - Maintain terminal state and IDE connections
- Show a fresh session initialization message
Describe alternatives you've considered
| Approach | Pros | Cons |
|----------|------|------|
| /clear | Quick, stays in session | Doesn't reload configs, doesn't truly reset state |
| /exit + claude | Complete restart | Requires exiting process, loses terminal state |
| Manual config reload | - | No current mechanism exists |
Use Cases
- Testing workflows: Developers testing Claude Code configurations who need to restart frequently
- MCP configuration changes: After modifying MCP server configurations, reload them without exiting
- Plugin updates: After installing, updating, or removing plugins, refresh the session to reflect changes
- Configuration changes: After modifying
.claudefiles (commands, agents, skills), reload without process restart
Additional context
This feature would be particularly useful for:
- Plugin developers who need to test changes frequently
- Teams onboarding to Claude Code who are iterating on CLAUDE.md and configuration files
- Power users who work in long-running sessions and periodically need fresh context
- CI/CD workflows that need session resets without process restarts
Expected Outcome
After running /restart, users should see:
- A confirmation that the session has been restarted
- Fresh session initialization message (similar to starting Claude Code)
- Current directory information
- Reloaded configuration summary (which configs/plugins were loaded)
- Ready to accept new commands with clean context
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗