Skip to content

Add /restart command to restart session from within chat #34320

@Tuzoff

Description

@Tuzoff

Feature request

There's no way to restart a Claude Code session from within the chat. When settings change (e.g., permission mode, effort level) or the extension needs a fresh process, the only options are:

  • Close and reopen the panel/tab
  • Use VSCode command palette → "Developer: Reload Window" (restarts the entire VSCode window)
  • /clear only clears history, doesn't restart the process

Proposed solution

Add a /restart slash command that:

  1. Cleanly shuts down the current session process
  2. Starts a new session with fresh settings
  3. Preserves the tab/panel position in the UI

This would be especially useful when:

  • Settings are changed mid-session (bypass permissions, effort level, etc.)
  • The session is in a bad state (near context limit, MCP connection issues)
  • After updating Claude Code to a new version

Environment

  • Claude Code 2.1.76
  • VSCode extension
  • Running in devcontainer (Linux)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions