Local models
Codex with Ollama on your own computer — and workspaces where cloud CLIs are blocked.
Some code must not go to a cloud provider — client projects with strict rules, for example. For that there are workspaces with “Local models only”: Codex works with a model on your computer there, and every cloud CLI is blocked.
Requirements
- Install and start Ollama (LM Studio works too).
- Pull a model, e.g.
ollama pull gpt-oss:20borollama pull qwen3-coder:30b. - The Codex CLI is installed — it talks to the local model through
--oss.
Turning it on
- In a workspace's plus menu: switch Local models only. Above it, OpenCognit shows whether Ollama is running and how many models it has.
- When setting up (“New sessions”): tick Local models only (Ollama) and pick the model below (or “Codex decides”). Starting sets the workspace to “local only”.
The workspace then carries the local badge in the sidebar.
What applies then
- Codex starts as Codex local (Ollama) — with
--ossand the chosen model. OpenCognit creates one local Codex per model; your regular Codex in other workspaces stays as it is. - Blocked are Claude Code, Gemini CLI, Kimi Code, Hermes, Codex without Ollama, threads and the orchestrator — on every way to start: plus menu, “New sessions”, variants, handover, board and the restore after a restart.
- Allowed is the plain shell (“Terminal only”) — it is not an AI agent.
- In usage, local models count as €0 and show up as processed locally.
Turn it off any time with the same switch.
Good to know
“Local only” is about the model: your code goes to no cloud model. Commands an agent runs in the
shell (e.g. npm install) may still reach the network — the guardrails and the
package protection check them as everywhere else.
Local models are slower and less capable than the large cloud models; for well-scoped tasks they are often good enough.