Claude Code /clear resets your current Claude Code conversation so you can start fresh without the previous chat context carrying forward; this guide explains what it does, when to use it, and what to do instead if you were expecting it to delete files, undo edits, or wipe project state. As an independent guide to Claude, c-ai.chat is not Anthropic; for the broader product overview, see our Claude Code guide.

- The short answer
- How it works
- What you’d actually do with it
- Vs. the alternatives
- Other questions readers ask
- The honest take
The short answer

/clear in Claude Code clears the active chat conversation, which is useful when Claude is anchoring too hard on earlier instructions, old code context, or a task you have already finished. It is for developers and technical users who want a clean slate in the same terminal workflow, not for people trying to uninstall Claude Code, erase project files, or reset billing.
- What it does · clears the current Claude Code chat context
- Where it runs · inside the Claude Code terminal workflow
- What it costs · no separate command fee; usage follows your Claude plan or API usage
- Who it’s for · developers who need a fresh conversation without leaving their coding session
That distinction matters. A lot of searches for “claude code clear” really mean one of four different things: clear the chat, clear memory, clear the terminal screen, or undo changes Claude suggested. /clear addresses the first one. If you need the wider product context, pricing rules, or account-level limits, the closest related references on this site are Claude features, Claude pricing, and our Claude API guide.
/clearis best thought of as “start a new conversation here,” not “reset everything Claude has ever seen.”
In practice, developers use it when a session has become noisy. Maybe you spent 20 turns debugging one issue and now want to switch to writing tests. Maybe Claude keeps referring to an earlier architecture choice that you no longer want. Clearing the conversation is often faster than trying to steer the model back with more instructions.
How it works

Claude Code is a conversational coding interface built around an ongoing session. As you chat, the model uses the current exchange as working context alongside whatever files, commands, and repository information you have surfaced in that session. When you run /clear, you are telling the interface to drop the active conversation history so the next prompt starts from a clean conversational baseline.
That does not mean your repository disappears, your terminal state is rolled back, or file edits are automatically undone. If Claude previously changed code, those file changes stay in your project until you edit or revert them yourself. Likewise, if your shell still has environment state or your git working tree has uncommitted diffs, /clear does not touch those.
For engineers, the mental model is simple: conversation state resets; project state does not. That makes the command useful when the problem is prompt drift, accumulated instructions, or too much prior back-and-forth. It is less useful when the real issue is repository hygiene, bad diffs, or tool configuration.
-
Run Claude Code in your project
Open the repository you want to work on and start your normal Claude Code session.
-
Work until context gets cluttered
Ask for fixes, refactors, tests, or explanations as usual. Over time, the session can accumulate assumptions you no longer want.
-
Enter
/clearThis resets the active conversation so your next request is treated as a fresh chat in the same coding environment.
-
Restate the task cleanly
Give the new goal in one prompt, such as
Write unit tests for auth middleware only; ignore the previous refactor discussion.
This also explains why /clear can improve output quality in long sessions. Large coding chats often become “sticky”: Claude may keep optimising for old requirements, old filenames, or old bug reports. Starting a fresh conversation narrows the active prompt stack and can produce more direct answers with fewer inherited assumptions.
Official Claude documentation and product pages are the right place to confirm current Claude product behaviour and availability, especially if you are comparing Claude Code access across Free, Pro, Max, Team, or Enterprise plans. Anthropic’s official product site is claude.ai, while developer documentation lives at docs.claude.com and platform.claude.com.
What you’d actually do with it
The easiest way to understand /clear is to look at the moments when developers actually reach for it. In most cases, the command is not part of the task itself. It is a session-management tool used between tasks.
Example 1: switch from debugging to implementation. You spent twenty prompts tracing a failing database migration. The issue is fixed. Now you want Claude to scaffold an admin dashboard. Instead of carrying all that migration history into the next request, run /clear and then prompt:
/clear
Create a React admin dashboard page for user billing status.
Use the existing design system components in this repo.
Do not modify backend routes.
Example 2: stop Claude from following outdated instructions. Earlier in the session, you asked Claude to avoid TypeScript changes. Later, you decide TypeScript edits are fine. If the model keeps respecting the old constraint, clear the conversation and restate the current rules:
/clear
Refactor the authentication module.
TypeScript changes are allowed.
Prefer small, reviewable edits and show me the diff summary first.
Example 3: isolate a code review request. Maybe Claude was previously generating code, but now you want a strict reviewer mindset. Starting fresh reduces the chance that the model defends or extends its earlier suggestions:
/clear
Review the current git diff for security risks and broken edge cases.
Do not propose a rewrite unless there is a clear defect.
Example 4: move from one repository area to another. After discussing API handlers, you switch to CI configuration. The prior context is mostly noise. A clean conversation helps:
/clear
Help me simplify the GitHub Actions workflow for test and lint jobs.
Assume the app code is unchanged; focus only on CI files.
Worked example
When /clear saves time in a long coding session
/clearWrite Playwright tests for checkout onlyThe value is not magic. It is simply less conversational baggage.
Example 5: prepare a reusable handoff prompt. Some teams use Claude Code for repeated maintenance tasks. They clear the conversation before each run so the prompt behaves more consistently across branches, tickets, or repos:
/clear
You are reviewing a small bugfix PR.
1. Summarise the changed files.
2. Flag regressions.
3. Suggest missing tests.
4. Keep feedback concise.
Pick when
- The chat has drifted away from your current task
- Claude keeps reusing outdated instructions
- You want a cleaner review, planning, or test-writing pass
- You are switching to a different part of the codebase
Skip when
- You still need the earlier reasoning in the next answer
- You wanted to undo file edits rather than reset chat context
- You were trying to clear the terminal screen only
- Your main problem is bad repo state, not bad conversation state
If you are using Claude across app, web, and developer workflows, this difference between “conversation reset” and “workspace reset” comes up often. That is one reason we keep separate guides on the main Claude reference, feature set, and developer-facing API: the same word “context” can mean different things depending on the surface.
Vs. the alternatives
People searching for claude code clear are often comparing Claude Code to coding assistants such as Cursor, GitHub Copilot, or Sourcegraph Cody. The important trade-off is not which tool has the most buttons. It is how each one handles session context, resets, and repo-aware workflows.
| Tool | How you reset context | Strength | Main trade-off |
|---|---|---|---|
| Claude Code | Clear the current conversation with /clear | Fast way to start a fresh coding chat without leaving the workflow | Does not undo file edits or replace git hygiene |
| Cursor | Start a new chat or compose in a new context | Tight editor integration and multi-pane workflow | Context can still sprawl across tabs, chats, and code selections if you are not disciplined |
| GitHub Copilot | New chat or separate chat thread, depending on surface | Broad IDE support and familiar GitHub ecosystem | Reset behaviour depends on product surface and IDE integration |
| Sourcegraph Cody | New chat/session and repo-scoped context controls | Strong codebase search and enterprise repository use cases | May feel heavier if you just want a simple terminal-first reset |
Claude Code’s advantage here is clarity. A command named /clear tells you exactly what it is for. The limitation is equally clear: it is a conversation reset, not a general project cleanup tool. If you prefer terminal-centric work and want an obvious way to drop prior chat baggage, that is a practical design choice. If you want everything anchored inside a full IDE canvas, another tool may fit your habits better.
Pricing is a separate question from the command itself. Claude plans start with a Free tier at $0/month, with Pro at $20/month or $17/month annual, and Max from $100/month. Team and Enterprise options add admin and organisational controls. API usage is priced separately by token, with active model rates including Opus 4.7 at $5/M input and $25/M output, Sonnet 4.6 at $3/M input and $15/M output, and Haiku 4.5 at $1/M input and $5/M output. For the current official plan page, see claude.com/pricing; for our plain-English breakdown, see Claude pricing.
Other questions readers ask
There is also a search-intent overlap with account and product questions such as “How do I clear Claude history?”, “How do I reset Claude Code?”, or “How do I start over in Claude?” Those are related but not identical. If your question is really about subscriptions, app access, or account-level capabilities, start with the official product at claude.ai and compare against our independent features guide.
The honest take
Claude code clear is simple: it resets the current Claude Code conversation so you can continue with a fresh prompt. That makes it genuinely useful, but only if your problem is conversational baggage. If you wanted file rollback, branch cleanup, lower pricing, or account-level deletion, this command is not the answer.
For most developers, the best use of /clear is between distinct tasks: debug one issue, clear, then move to tests, docs, review, or refactoring. Used that way, it keeps Claude more focused and your prompts easier to reason about. Used as a substitute for version control or workspace management, it will disappoint.
Independent guide. Not affiliated with Anthropic. For the official Claude product, visit claude.ai.
Last updated: 2026-05-12





