> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/yocxy2/claurst/llms.txt
> Use this file to discover all available pages before exploring further.

# Session commands

> Commands for managing conversation history, models, context, authentication, and session settings in Claurst.

Session commands control the state of your current conversation — clearing history, compressing context, switching models, and managing your account.

<AccordionGroup>
  <Accordion title="/clear — clear conversation history">
    **Aliases:** `reset`, `new`\
    **Type:** `local`\
    **Syntax:** `/clear`

    Clears the entire conversation history and starts a fresh session. This is the fastest way to free up the context window and begin a new task.

    **What it does:**

    * Runs any `SessionEnd` hooks before clearing
    * Wipes all messages and session caches (file read state, skill names, memory files, bash caches, agent definitions, and more)
    * Kills or aborts any foreground tasks
    * Resets the working directory to the original `cwd`
    * Generates a new session ID (the old one is recorded as a parent for analytics)
    * Runs `SessionStart` hooks after clearing

    **Example:**

    ```bash theme={null}
    /clear
    ```

    <Note>
      Background tasks that are still running are preserved across `/clear`. Their output symlinks are re-pointed to the new session automatically.
    </Note>
  </Accordion>

  <Accordion title="/compact — summarize history to save tokens">
    **Type:** `local`\
    **Syntax:** `/compact [custom instructions]`

    Replaces the conversation history with a compact summary, preserving context while significantly reducing token usage. Run this when you're approaching the context limit.

    **Arguments:**

    | Argument         | Description                                              |
    | ---------------- | -------------------------------------------------------- |
    | *(none)*         | Auto-summarize using the default strategy                |
    | `<instructions>` | Custom instructions to guide what the summary focuses on |

    **How compaction works:**

    1. If no custom instructions are given, Claurst first attempts session-memory compaction (cheaper, uses stored summaries).
    2. Otherwise it falls back to `microcompactMessages()` followed by a full `compactConversation()` call.
    3. On success, the user context cache is cleared and post-compact cleanup runs.

    **Examples:**

    ```bash theme={null}
    # Auto-compact
    /compact

    # Keep the refactoring context front-and-center
    /compact focus on the database schema changes we've discussed
    ```
  </Accordion>

  <Accordion title="/cost — show session cost and token usage">
    **Type:** `local`\
    **Syntax:** `/cost`

    Displays the total token cost and duration of the current session.

    * **API users:** Shows token counts and dollar cost via `formatTotalCost()`.
    * **claude.ai subscribers:** Shows subscription usage or overage notice instead of a raw dollar amount.

    **Example output:**

    ```
    Session cost: $0.42  (input: 48,320 tokens · output: 6,140 tokens)
    Duration: 23 minutes
    ```
  </Accordion>

  <Accordion title="/export — export session history">
    **Type:** `local-jsx`\
    **Syntax:** `/export [filename]`

    Opens an interactive export panel that lets you save the current conversation to a file or copy it to the clipboard.

    **Arguments:**

    | Argument     | Description                           |
    | ------------ | ------------------------------------- |
    | *(none)*     | Open the interactive export panel     |
    | `<filename>` | Export directly to the specified file |

    Multiple output formats are supported from the panel.
  </Accordion>

  <Accordion title="/model — switch the AI model">
    **Type:** `local-jsx`\
    **Syntax:** `/model [model]`

    Opens the model picker or sets the model directly. The command description shows the currently selected model.

    **Arguments:**

    | Argument  | Description                                    |
    | --------- | ---------------------------------------------- |
    | *(none)*  | Open the interactive model picker              |
    | `<model>` | Set the model directly, e.g. `claude-opus-4-6` |

    **Example:**

    ```bash theme={null}
    /model claude-opus-4-6
    ```
  </Accordion>

  <Accordion title="/config — open settings">
    **Aliases:** `settings`\
    **Type:** `local-jsx`\
    **Syntax:** `/config`

    Opens the interactive configuration panel, defaulting to the **Config** tab. From here you can change output style, toggle features, and adjust session preferences.

    ```bash theme={null}
    /config
    # or equivalently:
    /settings
    ```
  </Accordion>

  <Accordion title="/plan — enter or exit plan mode">
    **Type:** `local-jsx`\
    **Syntax:** `/plan [open|<description>]`

    Enables plan mode, which restricts the model to planning and discussion rather than executing tool calls. Useful for reviewing a strategy before applying changes.

    **Arguments:**

    | Argument        | Description                                |
    | --------------- | ------------------------------------------ |
    | *(none)*        | View current plan or toggle plan mode      |
    | `open`          | Open the plan file in your external editor |
    | `<description>` | Set or update the plan description inline  |

    **Example:**

    ```bash theme={null}
    # Enter plan mode
    /plan

    # Set a plan description directly
    /plan refactor the authentication module to use JWTs

    # Open the plan file in your editor
    /plan open
    ```
  </Accordion>

  <Accordion title="/effort — set thinking effort level">
    **Type:** `local-jsx`\
    **Syntax:** `/effort [low|medium|high|max|auto|help]`

    Controls how many "thinking" tokens the model uses. Higher effort means more thorough reasoning but slower and more expensive responses.

    **Arguments:**

    | Value         | Description                   |
    | ------------- | ----------------------------- |
    | `low`         | Minimal thinking tokens       |
    | `medium`      | Moderate thinking tokens      |
    | `high`        | Extended thinking             |
    | `max`         | Maximum thinking tokens       |
    | `auto`        | Model decides dynamically     |
    | *(none)*      | Show the current effort level |
    | `help` / `-h` | Show help                     |

    **Examples:**

    ```bash theme={null}
    /effort high
    /effort auto
    /effort          # show current
    ```

    <Note>
      If the `CLAUDE_CODE_EFFORT_LEVEL` environment variable is set and conflicts with your requested level, Claurst warns you.
    </Note>
  </Accordion>

  <Accordion title="/fast — toggle fast mode">
    **Type:** `local-jsx`\
    **Syntax:** `/fast [on|off]`

    Switches to a faster, cheaper model for the current session ("fast mode"). Useful when you want quick responses for low-stakes tasks.

    **Arguments:**

    | Argument | Description               |
    | -------- | ------------------------- |
    | `on`     | Enable fast mode          |
    | `off`    | Disable fast mode         |
    | *(none)* | Open the fast mode picker |

    **Gate:** Available to claude.ai and console users only. Hidden when the fast mode feature flag is off.
  </Accordion>

  <Accordion title="/context — visualize context usage">
    **Type:** `local-jsx` (interactive) / `local` (non-interactive)\
    **Syntax:** `/context`

    Displays a breakdown of how the context window is being used.

    In interactive mode, renders a color-coded visualization grid. In non-interactive (`--print`) mode, outputs a markdown table with:

    * Total tokens / max tokens / percentage used
    * Estimated usage by category (system prompt, memory files, tools, MCP, etc.)
    * Skills loaded and their token costs
    * Memory files and their sizes
  </Accordion>

  <Accordion title="/memory — edit memory files">
    **Type:** `local-jsx`\
    **Syntax:** `/memory`

    Opens an interactive editor for Claude memory files: `CLAUDE.md`, `CLAUDE.local.md`, and any other memory files in the current project or user memory directory.

    Memory files are read at the start of every session and injected into the system prompt.
  </Accordion>

  <Accordion title="/color — set prompt bar color">
    **Type:** `local-jsx`\
    **Syntax:** `/color <color|default>`

    Sets the color of the prompt bar for this session. Colors come from the same palette used by swarm agents.

    **Arguments:**

    | Argument                                       | Description                                   |
    | ---------------------------------------------- | --------------------------------------------- |
    | `<color>`                                      | A named color from the `AGENT_COLORS` palette |
    | `default` / `reset` / `none` / `gray` / `grey` | Reset to the default (no color)               |

    **Example:**

    ```bash theme={null}
    /color blue
    /color reset
    ```

    <Note>
      Swarm teammate sessions have their colors assigned by the team leader and cannot be changed with this command.
    </Note>
  </Accordion>

  <Accordion title="/keybindings — configure keyboard shortcuts">
    **Type:** `local`\
    **Syntax:** `/keybindings`

    Opens the keybindings configuration file in your default editor. The file is created with a starter template if it doesn't exist yet.

    **Gate:** Only available when keybinding customization is enabled (currently a preview feature).
  </Accordion>

  <Accordion title="/help — show help">
    **Type:** `local-jsx`\
    **Syntax:** `/help`

    Shows the help screen listing all available commands and keyboard shortcuts.

    ```bash theme={null}
    /help
    ```
  </Accordion>

  <Accordion title="/exit — exit Claurst">
    **Aliases:** `quit`\
    **Type:** `local-jsx`\
    **Syntax:** `/exit`

    Exits Claurst gracefully. Prints a random goodbye message.

    * If running in a `--bg` tmux background session, detaches the tmux client rather than killing it.
    * If in a worktree session, shows a dialog asking about worktree cleanup before exiting.

    ```bash theme={null}
    /exit
    # or:
    /quit
    ```
  </Accordion>

  <Accordion title="/login — sign in">
    **Type:** `local-jsx`\
    **Syntax:** `/login`

    Signs in to an account or switches to a different account if already authenticated. The description dynamically reads "Switch accounts" when you are already signed in.

    After login, Claurst refreshes API keys, resets cost state, re-enrolls the trusted device, and reloads remote managed settings.
  </Accordion>

  <Accordion title="/logout — sign out">
    **Type:** `local-jsx`\
    **Syntax:** `/logout`

    Signs out from the current account. This:

    1. Flushes pending telemetry
    2. Removes the API key from storage
    3. Wipes all secure storage (OAuth tokens, policy limits, betas cache, tool schema cache)
    4. Calls `gracefulShutdownSync()` — Claurst exits after logging out
  </Accordion>

  <Accordion title="/doctor — run diagnostics">
    **Type:** `local-jsx`\
    **Syntax:** `/doctor`

    Runs a full health check on your Claurst installation:

    * API key validity and model access
    * MCP server connectivity
    * LSP status
    * Plugin health
    * Any configuration issues

    ```bash theme={null}
    /doctor
    ```
  </Accordion>

  <Accordion title="/feedback — submit feedback or bug reports">
    **Aliases:** `bug`\
    **Type:** `local-jsx`\
    **Syntax:** `/feedback [report]`

    Opens the feedback submission flow. Use this to report bugs or send product feedback to Anthropic.

    **Gate:** Disabled when using Bedrock, Vertex, or Foundry endpoints, or when the `allow_product_feedback` policy is not allowed.

    ```bash theme={null}
    /feedback
    /bug
    ```
  </Accordion>

  <Accordion title="/resume — resume a previous conversation">
    **Aliases:** `continue`\
    **Type:** `local-jsx`\
    **Syntax:** `/resume [conversation id or search term]`

    Opens a fuzzy-searchable list of past sessions. Select one to resume it.

    **Arguments:**

    | Argument       | Description                                               |
    | -------------- | --------------------------------------------------------- |
    | *(none)*       | Open the interactive session picker                       |
    | `<id or term>` | Jump directly to a session matching the ID or search term |

    ```bash theme={null}
    /resume
    /continue my-feature-branch
    ```
  </Accordion>

  <Accordion title="/rewind — restore to a previous point">
    **Aliases:** `checkpoint`\
    **Type:** `local`\
    **Syntax:** `/rewind`

    Opens the message selector UI, letting you roll the conversation (and any code changes) back to an earlier point.

    ```bash theme={null}
    /rewind
    /checkpoint
    ```
  </Accordion>

  <Accordion title="/rename — rename the conversation">
    **Type:** `local-jsx`\
    **Syntax:** `/rename [name]`

    Renames the current session.

    **Arguments:**

    | Argument | Description                                         |
    | -------- | --------------------------------------------------- |
    | *(none)* | Auto-generate a 2–4 word name using the Haiku model |
    | `<name>` | Set a specific name                                 |

    ```bash theme={null}
    /rename fix-auth-bug
    /rename          # auto-generate
    ```
  </Accordion>

  <Accordion title="/copy — copy the last response">
    **Type:** `local-jsx`\
    **Syntax:** `/copy [N]`

    Copies Claude's most recent response to the clipboard. Pass a number to copy the Nth-latest response.

    ```bash theme={null}
    /copy       # copy the most recent response
    /copy 2     # copy the second-to-last response
    ```
  </Accordion>

  <Accordion title="/btw — ask a quick side question">
    **Type:** `local-jsx`\
    **Syntax:** `/btw <question>`

    Sends a quick question to the model without adding it to the main conversation history. The response appears in an overlay panel; press Enter or Escape to dismiss.

    ```bash theme={null}
    /btw what does ECONNRESET mean?
    ```
  </Accordion>

  <Accordion title="/vim — toggle Vim editing mode">
    **Type:** `local`\
    **Syntax:** `/vim`

    Toggles between **Vim** and **Normal** (readline-style) editing modes for the prompt input.

    ```bash theme={null}
    /vim     # switch to Vim mode
    /vim     # switch back to Normal mode
    ```
  </Accordion>

  <Accordion title="/output-style — deprecated">
    **Type:** `local-jsx`\
    **Syntax:** `/output-style`

    <Warning>
      This command is deprecated and hidden from the command palette. Use `/config` to change output style settings.
    </Warning>
  </Accordion>

  <Accordion title="/stats — view usage statistics">
    **Type:** `local-jsx`\
    **Syntax:** `/stats`

    Shows Claude Code usage statistics over time: session counts, total token usage, and costs.
  </Accordion>

  <Accordion title="/status — show system status">
    **Type:** `local-jsx`\
    **Syntax:** `/status`

    Shows a comprehensive status summary: running version, selected model, account info, API connectivity, and tool statuses.
  </Accordion>

  <Accordion title="/release-notes — view the changelog">
    **Type:** `local`\
    **Syntax:** `/release-notes`

    Displays the Claurst changelog. Fetches fresh notes if possible (500 ms timeout), falling back to the cached version.
  </Accordion>
</AccordionGroup>
