/clear Command

Resets the conversation history in an interactive Claude Code session. Use when context accumulation is causing drift — Claude starts contradicting earlier instructions or making inconsistent decisions. Claude Code still has filesystem access; only the conversation history is cleared.

Syntax

claude-code
/clear

// After clearing, re-establish context:
> Continuing work on [project name].
> Read CLAUDE.md for conventions.
> Current state: [brief description]
> Next task: [what you're working on]

Example

claude-code
// Signs you need /clear:
// - Claude generating code that contradicts CLAUDE.md
// - Repeated attempts at the same fix
// - Inconsistent naming appearing in new files

/clear

// Re-establish:
> I'm continuing work on the TaskFlow app.
> Read CLAUDE.md. Auth and project CRUD are complete.
> Next: implement task filtering per .kiro/specs/filters.md
> Run typecheck before reporting anything complete.