How to use Codex CLI: install → auth → small verifiable tasks → in China, fix proxy/region separately from model errors.
Proxy: Codex CLI proxy. IDE: VS Code Codex. ChatGPT web: ChatGPT access. Compare: How to use Claude Code.
Two failures, two fixes
Learn to tell them apart before you touch a model setting. A timeout means the CLI never reached OpenAI—Tun or env vars. An unsupported_country error means it reached OpenAI but from the wrong region—switch the exit node. Mixing them wastes an afternoon.
Set expectations
- It can edit your disk—use Git.
- Account/quota ≠ network path.
- Follow current official install docs for command names.
First session
- Install and put the binary on PATH.
- Sign in / API key.
- Read-only task in the repo root.
- One small write + your own verification.
Daily contract
| Step | You | Codex |
|---|---|---|
| Scope | Allowed paths | Stay inside |
| Accept | Test command | Match it |
| Review | Diff gate | Narrow on feedback |
China: timeout vs region
Timeouts → Tun/env + new terminal (proxy guide). Region errors → cleaner exits (latency test). Global pattern: Tun for AI tools.
Wrap-up
Download Clash Verge Rev. For Claude’s workflow see How to use Claude Code.