§05 · Handoffs

Clearing

Also called /clear · Fresh session · Starting over

Wiping the session so the next request starts from an empty context window, keeping only the standing instructions.

Clearing throws away the current session's conversation so the next request starts from an empty context window. Only the standing pieces survive: the system prompt, your AGENTS.md file, and whatever the memory system loads on startup. Everything else, including every file the agent read and every decision it made along the way, is gone. In Claude Code the command is /clear; other harnesses call it a new chat or a fresh thread.

Clearing feels like losing work, so people avoid it and push a bloated session onward instead. That is usually the wrong trade. Nothing you cleared was saved anywhere except in the window, so if a fact matters it should already live in a file, a commit, or a note. What a long session mostly holds is stale tool output and abandoned dead ends, and dragging those along is what pushes the agent out of the smart zone.

Clear at task boundaries, not mid-task. Finish the piece of work, commit it, write down anything the next session needs, then clear and start the next piece with a clean window. If the task is too big to finish before quality drops, that is a cue to write a handoff rather than to push through. Prefer clearing over compaction whenever the summary would need to carry more than a couple of sentences.

In the tools
  • Claude Code/clear empties the conversation; CLAUDE.md and memory files are read again on the next turn.
  • CodexStarting a new thread in the app, or a new codex run in the terminal, is the same move.
  • CursorOpen a new chat instead of continuing the old one; rules files still apply.
In conversation

It just rewrote the helper I told it not to touch, three times now.

You've been in that session since lunch. Commit what's good, clear, and start the next piece with a fresh window.

And re-explain everything?

Only the two lines that matter. Everything else it can read from the repo.

Related terms
Learn it in the school
Words are the easy part

Course 01 puts every one of these terms to work: you install Claude Code, run the loop, and ship a real project — permission modes, compaction, hooks and all.

Start Course 01 →