explaingit

ccycv/codex-opencode-worker

0JavaScriptAudience · developerComplexity · 3/5ActiveSetup · moderate

TLDR

Codex plugin that exposes OpenCode as an MCP executor so Codex can plan and review while OpenCode runs the actual coding tasks in the background.

Mindmap

mindmap
  root((codex-opencode-worker))
    Inputs
      Codex plan
      Provider model string
      OpenCode binary
    Outputs
      Run logs
      Changed files
      Token usage
    Use Cases
      Planner executor split
      Background coding runs
      Codex MCP integration
    Tech Stack
      JavaScript
      Node.js
      MCP
      OpenCode
      Codex

Things people build with this

USE CASE 1

Run a planner-executor coding loop where Codex plans and OpenCode writes the code

USE CASE 2

Add OpenCode as an MCP tool surface to any Codex setup

USE CASE 3

Monitor and review background coding runs through structured logs and changed-file lists

USE CASE 4

Pick or validate a specific provider/model for an OpenCode run from inside Codex

Tech stack

JavaScriptNode.jsMCPOpenCodeCodex

Getting it running

Difficulty · moderate Time to first run · 30min

Needs OpenCode installed and signed in plus a Codex build that supports local plugins or direct MCP server registration.

In plain English

OpenCode Worker for Codex is a small plugin that lets one coding-assistant tool hand work off to another. Codex is OpenAI's command-line coding assistant, and OpenCode is a different open-source coding agent. This plugin sets up Codex as the planner and reviewer, while OpenCode does the actual implementation work in the background. The README calls this a planner / executor split: Codex thinks about the task, supervises, and checks the result, while OpenCode goes off and writes the code. The expected workflow is described step by step. Codex first agrees a plan with the user. It then checks whether OpenCode is already running, optionally verifies that the requested model is available, starts an OpenCode run with the plan and acceptance criteria, and waits for it to finish without interrupting. Once OpenCode exits, Codex reads the log, the parsed run summary, and the list of changed files, runs any relevant tests or builds, and compares the result against the original request. If something is missing, Codex delegates a focused follow-up to OpenCode. The README states the plugin deliberately offers no stop, cancel, or kill tool. The plugin is presented to Codex as a set of MCP tools (MCP is a protocol for connecting tools to coding assistants). The tools include opencode_start and opencode_run_and_wait to kick off a run, opencode_status and opencode_wait for monitoring, opencode_logs and opencode_run_summary to inspect the output, opencode_changed_files to see what was modified, opencode_usage for token and cost stats, and opencode_models plus opencode_check_model for picking and validating a model. Requirements are Node.js, a Mac or Linux environment, and OpenCode installed and signed in. The README shows a one-line install command for OpenCode and lists the paths the worker checks to find its binary. Models are selected by passing a provider/model string, which gets forwarded as a command-line flag to OpenCode. Installation as a Codex plugin involves cloning the repo into a local plugins directory and registering it in a marketplace JSON file plus a config.toml file. There is also a direct MCP server registration mode for Codex builds that do not yet expose local plugins. State and JSONL logs live under ~/.local/state/codex-opencode-worker/. The README closes with safety notes: the worker refuses to start a second task while one is alive, the wait tool only waits, and OpenCode may modify files according to its prompt and permissions, so changes should be reviewed after each run.

Copy-paste prompts

Prompt 1
Install codex-opencode-worker as a Codex plugin and verify the MCP tools show up
Prompt 2
Walk me through a full planner-executor cycle from opencode_start to opencode_run_summary
Prompt 3
Show me how to point the worker at a specific OpenCode binary path the README doesn't already cover
Prompt 4
Add a wrapper around opencode_run_and_wait that auto-runs tests on the changed files after each run
Prompt 5
Explain why the plugin omits stop and cancel tools and how I would safely abort a run anyway
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.