[Feature] Add /restart command

Resolved 💬 1 comment Opened Dec 14, 2025 by salujayatharth Closed Dec 14, 2025

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:

  1. Exit Claude Code completely (/exit) and restart it with claude
  2. Use /clear which only clears conversation history but doesn't reload configurations
  3. 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 .claude configuration files (commands, agents, skills)
  • Maintain the current working directory
  • Preserve user settings and permissions (e.g., if --dangerously-skip-permissions was 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

  1. Testing workflows: Developers testing Claude Code configurations who need to restart frequently
  2. MCP configuration changes: After modifying MCP server configurations, reload them without exiting
  3. Plugin updates: After installing, updating, or removing plugins, refresh the session to reflect changes
  4. Configuration changes: After modifying .claude files (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:

  1. A confirmation that the session has been restarted
  2. Fresh session initialization message (similar to starting Claude Code)
  3. Current directory information
  4. Reloaded configuration summary (which configs/plugins were loaded)
  5. Ready to accept new commands with clean context

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗