How to use Ollama with Codex CLI (local gpt-oss, 2026)
ollama launch codex, the --oss flag, or a permanent profile, plus the 64k context Codex needs and what gpt-oss 20B vs 120B costs in VRAM at that…
Aliteq
Priya Nair · Software & Systems Editor
The short answer
Run ollama launch codex. Ollama refreshes Codex's model catalog and uses a dedicated Codex profile for the session. Without the launcher, add the --oss flag: codex --oss -m gpt-oss:20b. For a…
Fastest: ollama launch codex (undo it with ollama launch codex --restore)
One-off: codex --oss -m gpt-oss:20b
Permanent: a profile TOML, then codex --profile ollama-launch
Context: at least 64k, per Ollama's Codex page
Aliteq
Read the full story
How to use Ollama with Codex CLI (local gpt-oss, 2026)