Top 200 ReposEXPLORER
Browse agents, categories and pages
Back to results
Planned, not doneThe source describes an intention, not a finished result.

Run OpenAI’s Codex CLI on open models served by Ollama

Ollama’s docs show how to point Codex CLI at local tool-capable models such as gpt-oss with one launch command or a saved profile, switch models inside a session and turn off web search.

The problem

How it works

Ollama documents three ways to run the Codex CLI coding agent against models served by Ollama. The quickest is ollama launch codex, which refreshes the model list and starts Codex with a dedicated profile; inside the session /model switches between installed tool-capable models. The manual route is codex --oss with -m to pick a model such as gpt-oss:120b. For a lasting setup you save a profile pointing Codex at Ollama’s local endpoint on port 11434. Ollama recommends a context window of at least 64k tokens for Codex. Web searches from Codex go through Ollama’s web-search service, which needs ollama signin, and can be disabled for a session.

Results and limitations

This is setup documentation, not a report of results, so it is marked planned. How well the agent codes depends heavily on which model and hardware you use.

Before you try it

Large models such as gpt-oss:120b need a lot of memory, and a 64k context raises that further; smaller models fit more machines but plan and edit less reliably. Names ending in -cloud run on Ollama’s servers, not your machine, so pick a local model if code must stay on your hardware, and disable web search if prompts should not leave it. Codex still edits and runs commands, so keep its approval settings on and work in a repository under version control. Results depend on your setup and were not independently reproduced by Top 200 Repos.

Tools and repositories

Tools
Codex CLI · Ollama · gpt-oss or another tool-capable open model
Prerequisites
A machine with enough RAM or GPU memory for the chosen model at a 64k context, Node.js for Codex CLI, and Ollama.

Try it yourself: Give a local coding agent a small, checkable task

Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].

Preview
You are running on a local model, so keep each step small. In this repository, [Task]. Before editing, list the files you plan to change and why. Change at most [Maximum files to change] files. After editing, run [Test command] and show me the result. If tests fail twice, stop and explain what you tried instead of continuing.

Start with a model that fits comfortably in memory with a 64k context, and compare it on a task you already know the answer to.

Related videos

About openai/codex

Independent creators. Listing a video implies no endorsement, sponsorship or partnership.

Sources

  1. Codex CLI (opens in a new tab)

    Project documentation · docs.ollama.com · Undated · Source checked 12 Nov 2026, 09:55 UTC

    What this source supports
    • ollama launch codex starts Codex with a dedicated profile; /model switches between installed tool-capable models
    • Manual setup uses codex --oss, with -m to choose a model such as gpt-oss:120b, or a -cloud model
    • A profile can point Codex at http://localhost:11434/v1/
    • Use a context window of at least 64k tokens for Codex
    • Web search goes through Ollama, needs ollama signin, and can be disabled per session
Report a problem

Reported by source

Extract invoice fields locally with a vision model on Ollama

Stephen Sebastian replaced a paid cloud OCR API with Gemma 4 E4B on Ollama to pull date, amount and description from contractor invoice photos on his laptop.

dev.toollama/ollama
Reported by source

Run an open-weight model locally and call it from your code

Install Ollama, pull an open model and call it through the local REST API so prompts stay on your machine.

github.comollama/ollama
Reported by source

Answer technical questions by letting async agents run experiments

Simon Willison sends research questions to cloud coding agents such as Claude Code for web and Codex Cloud, which write and run experiments in a dedicated repo and open a PR.

simonwillison.net · 6 Nov 2025anthropics/claude-code, openai/codex
Planned, not done

Auto-tag receipts and bills in Paperless-ngx with paperless-ai

paperless-ai suggests titles, tags, correspondents and dates for documents in a Paperless-ngx archive, using a local Ollama model or a cloud LLM, with manual review and undo.

github.comollama/ollama
Reported by source

Control smart-home devices with a local LLM voice assistant

Connect Home Assistant to a local Ollama model as its conversation agent so you can ask it to control exposed devices privately.

github.comhome-assistant/core, ollama/ollama
Reported by source

Let a coding agent run overnight ML training experiments

Point a coding agent at autoresearch so it edits a small GPT training script, runs short timed experiments and keeps what improves.

github.comkarpathy/autoresearch, anthropics/claude-code, openai/codex

More with Codex CLI

Reported by source

Port a Python library to JavaScript with a coding agent

Simon Willison had Codex CLI translate the JustHTML parser into a dependency-free JavaScript library, steering it with about eight prompts over one afternoon.

simonwillison.net · 15 Dec 2025openai/codex
Reported by source

Prepare a tax return with an agent and compare it to an accountant

Kyle Corbitt worked through his 2025 US taxes with Codex, which researched rules, gathered documents and wrote a custom tax engine while a paid accountant did the same return.

corbt.com · 7 Mar 2026openai/codex, microsoft/playwright
Planned, not done

Make a motion graphics video from prompts with a coding agent and Remotion’s Agent Skills

Remotion’s docs show how to start a blank video project, add its official Agent Skills and then describe the video to Claude Code, Codex or OpenCode while the Studio preview updates beside it.

remotion.devanthropics/claude-code, openai/codex

View all: Codex CLI