OpenAI Codex harness — guide
The OpenAI Codex package lets you run your MeshWeaver chat threads on the Codex CLI, under your own ChatGPT subscription or OpenAI API key. Your threads, your mesh content and the mesh tools stay as they are; what changes is the engine that executes each round.
It is for people who already use Codex and want MeshWeaver's threads to run on that account and on Codex's own agent loop rather than on the models the mesh provides.
Key concepts
- A harness, not an agent. A harness decides what executes the round, not which agent you talk to. Switching a thread back to the standard MeshWeaver path loses nothing.
- Personal, access-based opt-in. Getting the package gives you access to it, and the
chat's harness picker offers the harnesses of every package you can read — so the harness appears
in your picker, and in no one else's who has not got the package. Nothing is copied into your
home for this. (On installations that still copy app content into homes, the older behaviour, the
Store also places a copy at
{you}/Harness/Codex.) There is no shared key, and nothing is billed to the mesh. - One Codex thread per mesh thread. The first round starts a Codex thread; every later round resumes it with only your new message, so Codex keeps the earlier turns, commands and tool results itself. If the Codex thread can no longer be resumed, the harness starts a fresh one in the same round and hands it the mesh thread's earlier turns as a bounded transcript.
- The mesh as the workspace. Each Codex thread is given MeshWeaver's MCP server, acting as you under your own credentials, so mesh access control applies unchanged. Codex's own shell runs in a read-only sandbox by default: the server's disk is not your workspace — the mesh is.
Typical workflow
- Get the package from the Store.
- Open a thread and pick OpenAI Codex as the harness.
- Run
/login. Connect your ChatGPT account with a device code — a browser window opens on the verification page, and the code and an authorization link also stay in the chat in case the popup is blocked — or paste an OpenAI API key. - Chat as usual. The answer streams token by token and Codex's reasoning summaries stream alongside it. Command runs, MCP tool calls, file changes and web searches show up in the thread as tool calls.
Uninstalling removes only a legacy home copy ({you}/Harness/…) where your installation made one;
it does not revoke your access to the package, so the picker keeps offering the harness and threads
that selected it keep using it. To stop using it, switch each thread to another harness — or to the
standard MeshWeaver agent path — in the picker; nothing breaks and no history is lost.
Models
A thread keeps its model selection when you switch harness. The harness forwards only OpenAI's own model ids to Codex; any other selection (the model router, another vendor's model) is not sent, so your account's default model applies. If your account does not offer the model you picked, the response names the model and the remedy — pick a model your account offers, or clear the selection — in your language, with the provider's own message beneath it.
Questions and approvals
Codex runs without a person watching each step, so the harness answers its requests by policy: command and file-change approvals follow the configured policy (by default Codex does not ask), and when Codex asks you a question, the question is shown in the thread so you can answer it in your next message.
What you get
- Codex as an execution engine for every MeshWeaver thread you choose.
- Continuity across rounds through Codex's own thread store, kept in your personal Codex home.
- The full mesh toolset through the MCP back-connection, under your own permissions.
- Your subscription or key, your login, your picker — nothing shared.
Signing in does not schedule anything: Codex runs when you send a message in a thread. How the harness drives the CLI, message by message, is documented in How the harness drives the CLI.