Codex CLIconfigurationbuilt-in
/model
Choose the active model (and reasoning effort when available). Opens a picker; press s to switch for the current session only.
Syntax
/model [model]Example
/model gpt-4.1When to use
- ▸Switching to gpt-4.1 for complex tasks
- ▸Using gpt-4.1-mini for fast, cheap iteration
- ▸Testing a specific model version before committing to it
More Codex CLI commands
configuration
/approve
Approve one retry of a recent auto review denial — lets Codex attempt a blocked action once under current policy.
session-management
/archive
Archive the current session and exit. Removes it from active session lists; transcript kept locally. Restore with 'codex unarchive <SESSION>'.
context-management
/compact
Summarize the visible conversation to free tokens. Use after long runs so Codex retains key points without blowing the context window.
code-review
/diff
Show the Git diff including files Git isn't tracking yet. Review Codex's edits before committing or running tests.