Cmd. /clear
Clear the terminal and current chat context, then start a fresh Codex chat.
Key takeaways
- Clear the terminal and current chat context, then start a fresh Codex chat.
- Check the input surface and availability before using the examples below.
Purpose
Clear the terminal and current chat context, then start a fresh Codex chat.
/clearAvailability
| Field | Value |
|---|---|
| Input surface | Running CLI prompt |
| Kind | Built-in |
| Status | Current reference |
| Aliases | — |
| Documented minimum | Not specified |
| Reviewed against | 2026-09-22 · Codex CLI 0.155.1 |
The installed command menu and account or organization settings determine availability.
Examples
/clearWhen to use it
- Inspect
/diff, then use/clearbefore beginning an unrelated task. - Run
/exportbefore/clearwhen the transcript is an audit artifact.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/clear | Clears the display and starts a fresh chat | Both the UI and conversation should reset |
/new [name] | Starts a new named chat | The new session needs a name immediately |
/compact | Summarizes the same chat | You must preserve the current context |
/exit | Exits the CLI | The terminal session itself is finished |
Effects and persistence
Starts a fresh conversation. Restate instructions that depended on the previous conversation when needed.
/clear clears the terminal and starts a fresh chat. The Developer Commands signature checked on
2026-08-30 has no name argument, so this handbook no longer documents /clear [name]. Use
/new [name] when the new chat needs a name at creation time.
Cautions
/cleardoes not revert Git changes or delete generated files.- Record a name, session ID, or export first when the old transcript must be recoverable.
- If the installed build differs, treat its slash popup and
/as the build-specific contract.
Official sources
Complete command list · Verification scope · History for this command