Skip to content

FAQ · Codex

Common Codex commands

CommandDescription
/modelChoose the model currently in use
/approvalsSet the approval rules for this session
/reviewHave Codex review the current workspace changes
/resumePick and continue from the session history
/newStart a new conversation
/initGenerate an AGENTS.md template in the current directory
/compactSummarize the conversation to free up context
/undoUndo Codex's last action
/diffView the current git diff
/statusView session config and token usage
/mcpList the currently available MCP tools
/exitExit the Codex CLI

Configure a global prompt (AGENTS.md)

Create AGENTS.md in the Codex config directory (%userprofile%\.codex / ~/.codex), write your global rules, then restart Codex to apply. For example:

markdown
# Codex global working guide
## Answering style
- Answers must be in English
- For summaries / plans / long content, prefer well-formatted tables; output regular content normally

Open config.toml and add:

toml
[features]
web_search_request = true

Restart Codex to use web search.

Garbled text in Codex on Windows

  1. Press Win + R, type intl.cpl and press Enter.
  2. Go to the "Administrative" tab → click "Change system locale".
  3. Tick "Beta: Use Unicode UTF-8 for worldwide language support" and confirm.
  4. Restart your computer and use Codex again to avoid garbled text.

How to use Codex more effectively

  • Break down tasks: don't throw a very vague, large task at it (like "build me an admin backend for a management system"). Codex is precise and does exactly what you point it at, so the more granular the task, the better.
  • Stay in control: before starting, estimate which files will change and what changes will be produced, so the changes don't escape your awareness.
  • Avoid compaction: if a task uses a lot of context and still isn't resolved — or even needs compaction — it usually means it wasn't broken down enough; go back and split it further.

No network in a sandbox / container

When Codex runs in a CLI sandbox or container (such as tun mode), if other tools work fine but only Codex can't fetch anything, a common cause is an incorrect MTU setting. Setting the MTU to 1500 usually fixes it (typically adjusted in your proxy / Clash client).

Still have questions?

For general and billing questions, see General & Billing, or contact our support email [email protected].