Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial
HomeDocsSearch
Search the documentation

49 pages for /clear.

Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.

inference-hooks Claude Developer Platform · in the page manage-claude/inference-hooks …on**, then edit or clear the prompt that returns to the input field. `/clear` starts over. See [Checkpointing](https://code.claude.com/docs/en/checkpointing). * **Cowork.** The user edits the denied m… Escalate hard decisions with the advisor tool Claude Code CLI · in the page advisor …ed the saved advisor in the current conversation, it stays off until `/clear` or `/compact`, even after you switch models. On some plans, Fable as the advisor also needs your one-time [consent to bil… How the agent loop works Claude Code CLI · in the page agent-sdk/agent-loop …the same conversation end with the `error_max_budget_usd` result. A [`/clear`](/docs/en/agent-sdk/cost-tracking) starts the budget over. #### Budget headroom Claude Code compares spend with the `max… Configure your agent Claude Code CLI · in the page agent-sdk/configuration …essages in the same conversation end with the same budget result. A [`/clear`](/docs/en/agent-sdk/cost-tracking) starts the budget over The two caps treat `0` differently: * **`maxTurns` / `max_turn… Track cost and usage Claude Code CLI · in the page agent-sdk/cost-tracking …en the call resumed a session. In a call where your app never sends `/clear`, `/reset`, or `/new`, read the latest result for call totals rather than summing across results. The running totals start… Agent SDK reference - Python Claude Code CLI · in the page agent-sdk/python …onversation is replaced without ending the connection, such as after `/clear`. See [Track costs in streaming input mode](/docs/en/agent-sdk/cost-tracking.md#track-costs-in-streaming-input-mode) for ho… Extend agents with skills Claude Code CLI · in the page agent-sdk/skills …-single-mode.md) or when resuming a session. ### Reset context with `/clear` The `/clear` command resets the conversation to an empty context, so subsequent prompts start with no prior conversation… Orchestrate teams of Claude Code sessions Claude Code CLI · in the page agent-teams …ands go to the lead's session, with these safeguards: * `/compact`, `/clear`, and `/rewind` act on the lead's conversation, so Claude Code asks you to confirm before running one of them from this vie… Share session output as artifacts Claude Code CLI · in the page artifacts …claude.ai account, so `/artifacts` works in a new session and after `/clear`, when an artifact's link has scrolled out of the terminal. ## Share an artifact A new artifact is visible only to you. T… Best practices for Claude Code Claude Code CLI · in the page best-practices …ed message. * **`"Undo that"`**: have Claude revert its changes. * **`/clear`**: reset context between unrelated tasks. Long sessions with irrelevant context can reduce performance. If you've correct… Claude Code changelog Claude Code CLI · in the page changelog …ndow after the session restarted * Fixed a conversation cleared with `/clear` sometimes coming back when a cloud or self-hosted runner session restarted * Fixed `CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS` b… Checkpointing Claude Code CLI · in the page checkpointing …wind left them. #### Rewind past a cleared conversation If you ran `/clear` earlier in the same Claude Code process, the rewind menu shows an additional entry at the top of the list labeled `/resume… Use Claude Code with Chrome Claude Code CLI · in the page chrome …group when the session ends depends on how it ends: * When you type `/clear`, Claude Code closes the group, open pages included, unless work that survives the clear is still running * When you switch… Use Claude Code in the cloud Claude Code CLI · in the page claude-code-on-the-web …`/context` | Yes | Shows what's currently in the context window | | `/clear` | No | Start a new session from the sidebar instead | Auto-compaction runs automatically when the context window approach… Commands Claude Code CLI · in the page commands …checks the diff for security vulnerabilities. **Between sessions.** `/clear` starts fresh on a new task while keeping project memory. `/resume` returns to an earlier conversation, `/branch` branches… Explore the context window Claude Code CLI · in the page context-window …w) for accepted values and overrides. * **Clear between tasks**: run `/clear` when switching to unrelated work. Old conversation crowds out the files you need next and costs tokens on every message. *… Manage costs effectively Claude Code CLI · in the page costs …k cache read, 50.0k cache write ($0.55) ``` These totals reset when `/clear` starts a new session, so the next session's total cost starts at \$0. Before v2.1.211, they kept accumulating across `/cle… Error reference Claude Code CLI · in the page errors …errors](#prompt-is-too-long) | | `Context limit reached · /compact or /clear to continue` | [Request errors](#prompt-is-too-long) | | `Context limit reached · /clear to continue` | [Request errors](#p… Fullscreen rendering Claude Code CLI · in the page fullscreen …to change what it compares against. ## Clear the conversation Run `/clear` to start a new conversation. If the display looks garbled or partially blank, press `Ctrl+L` to redraw the screen. The re… Glossary Claude Code CLI · in the page glossary …ou invoke by typing `/name` in the prompt. Built-in commands such as `/clear`, `/model`, and `/compact` control the session. You can define your own commands as files in `.claude/commands/`, or instal… Keep Claude working toward a goal Claude Code CLI · in the page goal …`, `none`, and `cancel` are accepted as aliases for `clear`. Running `/clear` to start a new conversation also removes any active goal. ### Resume with an active goal When you resume a session, Clau… Hooks reference Claude Code CLI · in the page hooks …`Setup`. When `SessionStart` fires again later in the session, after `/clear` or a compaction, its `mcp_tool` hooks run. For anything the session needs at launch, use a `type: "command"` hook on `Sess… Automate actions with hooks Claude Code CLI · in the page hooks-guide …ended. This hook only fires on the `clear` reason, set when you run `/clear`, not on normal exits: ```json theme={null} { "hooks": { "SessionEnd": [ { "matcher": "clear",… Interactive mode Claude Code CLI · in the page interactive-mode …project: * Input history is stored per working directory * Running `/clear` starts a new session: recall then lists the new session's prompts first, with earlier sessions' prompts after them. The pr… Claude Code gateway compatibility guide Claude Code CLI · in the page llm-gateway-protocol …equests in the conversation keep that shape until the developer runs `/clear` or the conversation compacts * When the upstream rejects only the `cache_control` marker on a mid-conversation system mess… Monitoring Claude Code CLI · in the page monitoring-usage …| | - | - | - | | `session.id` | Claude Code's own session ID, which `/clear` replaces | `OTEL_METRICS_INCLUDE_SESSION_ID` (default: true) | | `ccr.session.id` | Cloud session identifier, the value of… Output styles Claude Code CLI · in the page output-styles …ut-style). Before v2.1.251, the new style applied only after you ran `/clear` or started a new session. ## Create a custom output style A custom output style is a Markdown file: frontmatter for meta… Draw in the interface with a mod Claude Code CLI · in the page plugins/mods/interface …s in `hello-tabs` | | `$.state` | The session ends, or the user runs `/clear`, `/resume`, or `/branch` | Values a drawing depends on that should survive a reload | | `$.store` | Your mod deletes it, o… Mods reference Claude Code CLI · in the page plugins/mods/reference …re the first prompt, and again after a reload of that mod. Not after `/clear`, `/resume`, or `/branch`. | `next(e)` | | `session.end` | The session ends, or `/clear`, `/resume`, or `/branch` runs. `e.… Test a mod Claude Code CLI · in the page plugins/mods/test …at a new layout in a real session as well. ### Test a drawing after `/clear` Each test starts with every `$.state` value at its default, which is how `/clear` leaves them. To test what your mod does… Troubleshoot a mod Claude Code CLI · in the page plugins/mods/troubleshoot …ocs/en/plugins/mods/interface#keep-state). ### A value resets after `/clear`, `/resume`, or `/branch` A value resets, or a saved value is replaced by its default. Each of those commands resets `$.st… How Claude Code uses prompt caching Claude Code CLI · in the page prompt-caching …| CLAUDE.md, auto memory, unscoped rules | Session starts, or after `/clear` or `/compact` | | Conversation | Your messages, Claude's responses, tool results | Every turn | A change to the conversat… Quickstart Claude Code CLI · in the page quickstart …ter it starts. | Command | What it does | Example | | - | - | - | | `/clear` | Clear conversation history | `/clear` | | `/help` | Show available commands | `/help` | | `/exit` or Ctrl+D twice | Exit… Continue local sessions from any device with Remote Control Claude Code CLI · in the page remote-control …appens. These cases go beyond ordinary messages: * **Compaction and `/clear`**: while Claude Code [compacts the conversation](/docs/en/context-window.md#what-survives-compaction), connected devices s… Run prompts on a schedule Claude Code CLI · in the page scheduled-tasks …executing: * Built-in commands such as `/permissions`, `/model`, or `/clear` * Skills marked [`disable-model-invocation: true`](/docs/en/skills#frontmatter-reference), including the bundled `/verify`… Manage sessions Claude Code CLI · in the page sessions …data) as you work, so you can return to one after exiting or running `/clear`. Use these entry points: | Command | What it does | | :- | :- | | `claude --continue` | Reopens the most recent session i… Claude Code settings Claude Code CLI · in the page settings …cs/en/output-styles): part of the system prompt, which is rebuilt on `/clear` or restart ### Invalid entries in managed settings Managed settings parse tolerantly. When a managed configuration conta… All settings Claude Code CLI · in the page settings-reference …-output-style). Before v2.1.251, the edit applied only after you ran `/clear` or started a new session. * **Scope**: [`Any file`](#scopes) * **Type**: string, the name of a [built-in](/docs/en/output… Customize your status line Claude Code CLI · in the page statusline …e is in effect. May differ from your actual bill. Resets to \$0 when `/clear` starts a new session | | `cost.total_duration_ms` | Total wall-clock time the session has been running, in milliseconds. A… Create custom subagents Claude Code CLI · in the page sub-agents …agent. The check is scoped to the current conversation and resets on `/clear`. A subagent treats messages from the agent that launched it as normal task direction, including mid-task course correctio… Tools reference Claude Code CLI · in the page tools-reference …mands return `Claude ended this conversation. Start a new session (or /clear) to continue.`, and only `/clear`, `/resume`, `/help`, `/exit`, and `/feedback` still run. Claude Code records the end in t… Troubleshooting Claude Code CLI · in the page troubleshooting …ocs/en/sub-agents.md) so it runs in a separate context window 4. Run `/clear` if the earlier conversation is no longer needed If the error comes back after a `/clear`, run [`/context`](/docs/en/debug… Find bugs with ultrareview Claude Code CLI · in the page ultrareview …er conversation: when you start a new conversation, for example with `/clear`, Claude Code shows the confirmation again for the next paid review. ## Track a running review A review typically takes 1… Week 13 · March 23–27, 2026 Claude Code CLI · in the page whats-new/2026-w13 …n in your preferred terminal, not first-detectedIdle-return nudge to `/clear` after 75+ minutes awayVS Code: rate limit banner, Esc-twice rewind picker [Full changelog for v2.1.83–v2.1.85 →](/docs/en… Week 26 · June 22–26, 2026 Claude Code CLI · in the page whats-new/2026-w26 …mmand output with the ! prefix, and resume a conversation from before /clear with /rewind. Releases [v2.1.185 → v2.1.193](/docs/en/changelog.md#2-1-185) 2 features · June 22–26 Authenticate MCP serv… Week 34 · August 17–21, 2026 Claude Code CLI · in the page whats-new/2026-w34 …ttings.json {2} theme={null} { "outputStyle": "Concise" } ``` Run `/clear` or start a new session, and Claude's replies lead with the result. [Built-in output styles](/docs/en/output-styles.md#bui… What's new Claude Code CLI · in the page whats-new/index …second prompt); **`/rewind`** can resume a conversation from before `/clear` was run; and **background subagents** now surface permission prompts in the main session instead of auto-denying. [Read t… mcpdo connection client Model Context Protocol · in the page docs/2026-07-28/tools/inspector/mcpdo …wn as", and `● live` when an open connection holds it. | | `mcpdo auth/clear <url-or-name>` | Clear one stored credential, by store URL or friendly name. `--all --yes` clears every one. | | `mcpdo aut… mcpdo connection client Model Context Protocol · in the page docs/draft/tools/inspector/mcpdo …wn as", and `● live` when an open connection holds it. | | `mcpdo auth/clear <url-or-name>` | Clear one stored credential, by store URL or friendly name. `--all --yes` clears every one. | | `mcpdo aut…
Feedback