AivexaNewsSearch
AI news for builders and product teamsChecked every hour

OpenAI Codex with Ollama

Collected Oct 1, 2026

Ollama published instructions on January 15, 2026, for using open models with OpenAI's Codex CLI. According to the post, Codex can read, modify, and execute code in the user's working directory using models such as gpt-oss:20b, gpt-oss:120b, or other open-weight alternatives.

To get started, users install Codex CLI with the command npm install -g @openai/codex and then start Codex with the --oss flag by running codex --oss. By default, Codex uses the local gpt-oss:20b model, the post states.

The post notes that Codex requires a large context window and recommends at least 32K tokens. It directs readers to documentation for how to adjust context length in Ollama.

Models can be changed with the -m flag; the example given is codex --oss -m gpt-oss:120b. All models on Ollama Cloud also work with Codex, according to the post, with the example codex --oss -m gpt-oss:120b-cloud.

For more detailed setup instructions and configuration options, the post points to a Codex integration guide.

Read at Ollama

Based on reporting from the original publisher. Visit the source for full context and later updates.

Publisher excerpt

Open models can be used with OpenAI's Codex CLI through Ollama. Codex can read, modify, and execute code in your working directory using models such as gpt-oss:20b, gpt-oss:120b, or other open-weight alternatives.