iCode Workbench · Harness · Codex

Codex in iCode Workbench

Codex is OpenAI's CLI coding agent. In Workbench it runs as a primary harness: each session gets its own Git worktree, the task sits in a durable queue, and the result is reviewed in the checkout where it was made.

This page is currently available in English only.

What Codex is good at

  • OpenAI models. Codex works with your OpenAI account or a compatible provider endpoint; Workbench does not replace the model or the agent loop.
  • Tool-using tasks. It reads the repository, edits files, runs commands, and iterates on failures in a terminal-native workflow.
  • Resumable sessions. Codex keeps its own conversation state; Workbench can resume a session by id.

Workbench changes where the session runs and how the result is tracked; it does not change Codex's model behavior or permissions.

Why run it in Workbench

  • One worktree per session. Two Codex sessions in one checkout can overwrite each other; Workbench gives each its own branch and working directory.
  • A durable queue. A session is a process; a task has states. Workbench tracks queued, running, waiting, completed, and failed work.
  • Native provider injection. Codex is one of the three harnesses (with Claude Code and OpenCode) that support provider endpoint injection and Mira's native assistant.
  • Review in place. Files, Search, and Source Control live beside the terminal, scoped to the session checkout, with line notes and a separate review decision.

Setup

  1. Install the Codex CLI using OpenAI's official instructions, then confirm codex --version works in your shell.
  2. Run it once in a repository outside Workbench, so the CLI's authentication and settings are in place.
  3. Add the repository to Workbench and open it. The harness keeps its own credentials; Workbench does not store your OpenAI token.

If Codex is installed but Workbench does not see it, check that the codex executable is on the PATH of the shell Workbench launches. On Windows, a WSL target needs Codex installed inside the distro, not only on Windows.

Launch and resume

Create a new session from New worktree, choose Codex, and give the task a scope. Workbench launches codex in the session checkout. Each session is independent: its own branch, its own terminal, its own context.

Workbench uses Codex's resume recipe: resume $TOKEN when a session id was captured, and resume --last as the fallback. If the app restarts, the detached host keeps the PTY alive; sleep a session to stop the process and keep the checkout, then wake it to resume where the harness supports it.

Task and review

Give the session a task statement with a goal, owned paths, a done-when command, and an out-of-scope list. When the session finishes, review the diff in its checkout: run the done-when command yourself, check files outside the owned paths, and decide accept, revise, or reject.

A completed process is not an accepted task. For the workflow, read how to review AI-generated code and how to queue coding agent tasks.

Status at a glance

The session row shows the project, branch, target, and state. Codex reports its running and waiting state through Workbench's native adapter; a session that cannot report stays unknown rather than guessing. Sleep a session to stop the process and keep the checkout; wake it to resume where the harness supports it.

A concrete task

Task: “Add a bounded retry to the billing webhook.”

  1. Create a worktree from main and name the branch after the task.
  2. Scope the session: owned paths src/billing/webhook.ts and tests/billing/**; provider configuration and schema changes are out of scope.
  3. Launch Codex in the session checkout with the task statement and the done-when command.
  4. Queue the task if another session is running; do not open two Codex sessions in one checkout.
  5. Review the diff in the checkout: run the billing tests, check that the retry is bounded, and confirm the failure path is covered.
  6. Decide accept, revise, or reject; merge one branch at a time.

Codex's session resume is useful after a restart, but it is not a review. The diff still needs a person. If you want to compare Codex with another harness, give each its own worktree and review both diffs against the same task statement; do not run two agents in one checkout. The queue, worktree, and review gate are the same for every harness; only the agent and its model change.

Limits

  • Workbench does not change the agent. Codex's model behavior, sandboxing, and approvals are its own.
  • Desktop only. Workbench is a desktop app; there is no mobile or remote server. If you need those, Orca is the broader tool.
  • Pre-1.0. Workbench is still changing; verify current behavior before standardizing a team on it.