You type /clear to start a new task and the prompt goes blank. Then the doubt hits: what exactly was erased? The conversation, the tasks that were running, the plan you had built, the edit history? The short answer is that /clear wipes the session, not the project. It opens a new session, and the old one stays on disk, ready to be resumed. This guide goes through, item by item, what the command erases and what it keeps in Verboo Code.
What does /clear do in Verboo Code?
It wipes the conversation messages and frees up the context window, without killing the process or leaving the project. The description in the source is literal: "Clear conversation history and free up context". The command also answers to the aliases /reset and /new.
Before clearing, Verboo Code runs the SessionEnd hooks with reason clear. After clearing, it runs the SessionStart hooks with source clear. In other words: you can save something from the session that is leaving and inject context into the one being born.
What does /clear erase?
Everything it erases lives in the session memory. None of it is a project file on disk.
| Item | After /clear |
|---|---|
| Conversation messages | Erased |
| Foreground tasks | Killed |
| Context, read-file and suggestion caches | Reset, so files must be read again |
| MCP connections | Restarted and reconnected |
/rewind snapshot history | Reset |
| Working directory | Back to the project's original directory |
| Session title, tag, name and color | Cleared on the new session |
Two items on that list catch people off guard. The first is /rewind: because the snapshot history is reset, an edit made before /clear no longer shows up in the new session's /rewind. If you are going to need to undo something, do it before clearing. The second is the directory: if you had cd'd elsewhere or added a folder with /add-dir, /clear puts you back in the directory where the project was opened.
What does /clear keep?
Files, configuration and history stay intact. The command does not touch what is on disk.
| Item | After /clear |
|---|---|
| Project files | Intact |
| Memory files, such as CLAUDE.md and AGENTS.md | Kept; only the cache is re-read from disk |
| Background tasks | Preserved and still running |
| Model, theme, permissions and settings | Kept |
| Current worktree | Kept |
| Transcript of the old conversation | Kept on disk |
Background tasks are the most useful detail. When you send a command to the background with Ctrl+B and then run /clear, that task keeps running. /clear only kills what is in the foreground holding the prompt.
How do you get the conversation back after /clear?
With /resume. /clear does not delete the previous conversation file: it creates a new session and records the old one as the parent session, to keep the lineage. The old transcript stays on disk, and you go back to it whenever you want.
/resume
The command takes a search term, handy when you do not remember the session id:
/resume migration
From the terminal, the same path has its own flag. -r opens the picker or resumes an id, and -c resumes the most recent conversation in the directory:
verboo -r "migration"
verboo -c
How do you make /clear open with the context you want?
With a SessionStart hook that only fires when the source is clear. Whatever the hook prints is attached to the new session's context, so the agent starts clean but already knows what you decided it needs to know.
Add this to the project's .verboo/settings.json:
{
"hooks": {
"SessionStart": [
{
"matcher": "clear",
"hooks": [
{ "type": "command", "command": "cat .verboo/base-context.md" }
]
}
]
}
}
The matcher receives the SessionStart source, and clear is one of them. The same file also accepts startup, resume and compact, so you can tell apart what loads when the session starts from scratch and what loads when it is resumed.
On the other side, the SessionEnd hook with reason clear runs before the cleanup and is there to record a summary of what was going on. A command that dumps the state into a file and the SessionStart that reads that file handle the handoff between the session that dies and the one that is born.
There is a limit: SessionEnd on /clear runs on a short time budget, 1.5 seconds by default, adjustable through the CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS variable. A script that scans the whole repository will not finish in time. Save only what is fast: the list of changed files, the last decision, the next step.
Does /clear work in non-interactive mode?
Not as a command. In the source, /clear is marked as not supported in non-interactive mode, on the grounds that there each run already creates its own session. If you run Verboo Code with -p, every call starts from scratch by definition, and there is no accumulated conversation to clear.
When should you use /clear instead of /compact?
When the next task does not depend on the previous one. /compact swaps the history for a summary and keeps the session alive, which is better when you are in the middle of the same work. /clear starts with no summary at all, which is better when the old summary would only get in the way. For the compaction walkthrough, see the /compact in Verboo Code guide.
Clearing context without losing the history is what makes long sessions sustainable. Verboo Code runs this flow in the terminal with unlimited tokens on the plan: create your account at verboo.ai, install the CLI and run /clear on your next topic switch.



