Codex's terminal interface combines the chat, tool output and controls in one session. Mastering it comes down to a simple idea: slash commands are not prompt magic but client actions with concrete documented behavior. The difference is fundamental. When you understand that /clear, /side or /diff are client commands rather than hints to the model, you stop guessing about their effect and start using them predictably, like buttons with a known function.
The first thing to separate in your head is clearing the screen and clearing the context. Ctrl+L clears only the terminal view: the conversation history and context stay in place. And /clear starts a new chat - that is, it really resets the session context. They are easy to confuse, and the cost of the mistake differs: one merely redraws the screen, the other discards everything the model remembered about the task. Understanding this pair saves both context and nerves.
The side chat is an underrated tool of attention management. The /side command creates a temporary side chat without breaking the main transcript: in it you can ask a clarifying question or test a hypothesis without cluttering the main line of work. It is a convenient alternative to interrupting the current task or starting a new chat. The main conversation stays clean, while exploratory branches live separately and do not blur the context of the main work.
Small commands save more than it seems. /copy copies the last completed answer - handy when the result needs to be carried outward, into an issue or a note. The full current list of commands is always wider than any static table and is given in the reference at the end of the book, and the most accurate source is slash autocomplete in a live session. The set of available commands depends on the version, surface and extensions, so it is checked in the interface, not from memory.
It helps to gather the most-used commands into a table once, to return to it as needed. Below is the map: checking state, managing permissions and the model, switching to planning, viewing the diff, running review and compacting the history. You return to it until your hand has learned the reflexes. It is these commands, not a session restart, that are the right reaction to most situations: look at /status first rather than guess.
A quick self-audit is made of several commands. /status shows the effective model, permissions, writable roots and context - a snapshot of the conditions the work runs in. /permissions changes the permission profile or the approvals preset. /model selects the model and the supported reasoning effort. /diff shows staged, unstaged and untracked changes, and /review starts a review of the working tree. Together these commands answer the question "what is happening now" without relying on assumptions.
| Command | Practical meaning |
|---|---|
| /status | Effective model, permissions, roots and context |
| /permissions | Change the permission profile or approvals preset |
| /model | Select the model and supported reasoning effort |
| /plan | Switch to a planning-only workflow |
| /diff | Staged, unstaged and untracked changes |
| /review | Start a review of the working tree |
| /compact | Compact the history in a long session |
The point of the TUI is not the set of hotkeys but the controllable cycle. A good session goes through clear phases: discovery, plan, implementation, verification, review - and preserves context only where it is truly needed, compacting the history at natural boundaries via /compact. Slash commands are switches between these phases and tools for checking state, not decorations. A controllable cycle separates meaningful work from a stream you can only watch.
The typical TUI failures are predictable. Confusing Ctrl+L and /clear and either not resetting the context when needed or discarding it by accident. Doing exploration in the main chat instead of /side and cluttering the main line. And relying on memory of commands instead of autocomplete and /status, taking a stale set for the current one. Master the separation of screen and context clearing, the side chat and a quick self-audit - and the interface becomes a controllable tool rather than a set of mysterious combinations.