codex-supervisor-mcp 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +99 -195
- package/README.md +72 -168
- package/package.json +1 -1
- package/skills/codex-supervisor/SKILL.md +53 -126
- package/src/landing.js +63 -4
- package/src/mcp-server.js +9 -7
- package/src/side-chat.js +87 -9
- package/src/task-store.js +17 -5
package/README.en.md
CHANGED
|
@@ -16,23 +16,23 @@ English | [中文](README.md)
|
|
|
16
16
|
|
|
17
17
|
## What it is
|
|
18
18
|
|
|
19
|
-
Point several agents at one repository and they overwrite each other, and nobody can say
|
|
19
|
+
Point several agents at one repository and they overwrite each other, and nobody can say who changed what. This MCP takes dispatch and bookkeeping out of the model's context and puts them on disk:
|
|
20
20
|
|
|
21
|
-
| Problem | What
|
|
21
|
+
| Problem | What it does |
|
|
22
22
|
|---|---|
|
|
23
|
-
| Workers
|
|
24
|
-
|
|
|
23
|
+
| Workers trample each other's files | One Git worktree per worker, `ownedPaths` checked for overlap before dispatch |
|
|
24
|
+
| Worker output floods the main thread | Events go to `data/runs/<taskId>.jsonl`; reads are gated by `limit` / `maxChars` / `kinds` |
|
|
25
25
|
| One status read fills the context | `get_orchestration_overview` fits every worker into 7000 bytes |
|
|
26
|
-
| Nobody knows who is still running after a restart | `supervisor.sqlite
|
|
27
|
-
| A new session cannot pick up an old worker | `resume_codex_worker` runs `codex exec resume <thread_id
|
|
28
|
-
| "
|
|
29
|
-
|
|
|
26
|
+
| Nobody knows who is still running after a restart | `supervisor.sqlite`, one row per work, with `thread_id` |
|
|
27
|
+
| A new session cannot pick up an old worker | `resume_codex_worker` runs `codex exec resume <thread_id>`: the same Codex conversation |
|
|
28
|
+
| "Failed" and "process gone" look alike | The state machine keeps `failed` and `lost` apart |
|
|
29
|
+
| No view of where a batch is | `codex-supervisor-web`, a board that shows every worker by session |
|
|
30
30
|
|
|
31
|
-
Workers
|
|
31
|
+
Workers run `codex exec`; `model` is passed through. The main thread stays on Claude for judgement, workers can run DeepSeek or any model Codex has a provider for, and the bills stay separate.
|
|
32
32
|
|
|
33
33
|
## Five minutes to a running batch
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Prerequisites: Node.js 22.13.0 or newer, `codex` on `PATH`. macOS, Linux and Windows.
|
|
36
36
|
|
|
37
37
|
### 1. Install
|
|
38
38
|
|
|
@@ -40,37 +40,30 @@ Requirements: Node.js 22.13.0 or newer, and the `codex` CLI on `PATH`. macOS, Li
|
|
|
40
40
|
npm install -g codex-supervisor-mcp
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
claude mcp list | grep codex-supervisor
|
|
47
|
-
codex mcp list | grep codex-supervisor
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
If it is missing (`npx`, `--ignore-scripts` and pnpm installs skip `postinstall`), add it by hand:
|
|
43
|
+
`postinstall` copies the skill into `~/.claude/skills/`, `~/.agents/skills/` and `~/.codex/skills/` and registers the MCP with `claude mcp add -s user` and `codex mcp add`. If `claude mcp list` does not show it (`npx`, `--ignore-scripts` and pnpm skip `postinstall`), add it by hand:
|
|
51
44
|
|
|
52
45
|
```bash
|
|
53
46
|
claude mcp add -s user codex-supervisor -- npx -y codex-supervisor-mcp
|
|
54
47
|
codex mcp add codex-supervisor -- npx -y codex-supervisor-mcp
|
|
55
48
|
```
|
|
56
49
|
|
|
57
|
-
Restart Claude Code / Codex
|
|
50
|
+
Restart Claude Code / Codex. Updates take care of themselves from here; see "Updating".
|
|
58
51
|
|
|
59
52
|
### 2. Dispatch a batch
|
|
60
53
|
|
|
61
|
-
|
|
54
|
+
Say it in plain words in Claude Code; the skill makes it follow the right steps:
|
|
62
55
|
|
|
63
|
-
> Fill in the unit tests for these three modules
|
|
56
|
+
> Fill in the unit tests for these three modules, three codex-supervisor workers in parallel, session "unit tests".
|
|
64
57
|
|
|
65
58
|
What the main thread does underneath (you can call the tools yourself):
|
|
66
59
|
|
|
67
60
|
```
|
|
68
61
|
create_codex_worker ×3 each with session_id, session_title, ownedPaths, goal
|
|
69
|
-
wait_codex_workers two
|
|
70
|
-
get_worker_result ×3
|
|
62
|
+
wait_codex_workers two minutes by default, then a snapshot, call again until done
|
|
63
|
+
get_worker_result ×3 each worker's full report and changed files
|
|
71
64
|
```
|
|
72
65
|
|
|
73
|
-
Each worker's changes sit on its own `codex/<taskId>` branch
|
|
66
|
+
Each worker's changes sit on its own `codex/<taskId>` branch; whether and how to merge is the main thread's call.
|
|
74
67
|
|
|
75
68
|
### 3. Open the board
|
|
76
69
|
|
|
@@ -80,17 +73,13 @@ codex-supervisor-web
|
|
|
80
73
|
npx -p codex-supervisor-mcp codex-supervisor-web
|
|
81
74
|
```
|
|
82
75
|
|
|
83
|
-
Open `http://127.0.0.1:7877`.
|
|
84
|
-
|
|
85
|
-
Which store it opens: `SUPERVISOR_HOME` from the environment if set; otherwise the nearest `.mcp.json` above the current directory, if its `codex-supervisor` entry sets `SUPERVISOR_HOME`; otherwise the default `~/.codex-supervisor`. The startup line says which one and where it came from, so running it inside the project directory is enough.
|
|
86
|
-
|
|
87
|
-
`SUPERVISOR_WEB_PORT` changes the port. A taken port (usually a board that is already running) is reported in one line and the process exits. The board does not dispatch or cancel; the ask tab starts a read-only Codex side session, described below.
|
|
76
|
+
Open `http://127.0.0.1:7877`. State directory: `SUPERVISOR_HOME` if set, else the one configured in the nearest `.mcp.json` above the current directory, else `~/.codex-supervisor`. `SUPERVISOR_WEB_PORT` changes the port; a taken port is reported. The board never dispatches or cancels.
|
|
88
77
|
|
|
89
78
|
## How I use it
|
|
90
79
|
|
|
91
|
-
|
|
80
|
+
This MCP does not care who the main thread is: Claude Code, Codex, Cursor, anything that speaks MCP can dispatch, and workers use whatever model Codex has a provider for. What follows is my way, not the only way.
|
|
92
81
|
|
|
93
|
-
I run two Claude Code sessions
|
|
82
|
+
I run two Claude Code sessions, one for documents and one for dispatch. A session that writes the design and watches the workers fills its context in two hours.
|
|
94
83
|
|
|
95
84
|
| Who | Where | Does what |
|
|
96
85
|
|---|---|---|
|
|
@@ -99,7 +88,7 @@ I run two Claude Code sessions. One writes documents, the other dispatches. A se
|
|
|
99
88
|
| Main-brain session | A worktree of the code repository | Read the brief, dispatch Codex workers, check every worker's diff, write results back into the brief, report to me. Writes no business code |
|
|
100
89
|
| Codex workers | Their own worktrees | One worker per step, one commit per step, build and verify on a remote machine. No push, no merge |
|
|
101
90
|
|
|
102
|
-
|
|
91
|
+
One block of text passes between the two sessions: the planning session writes it, I paste it into the main-brain session and hand it over with `/goal`. Its shape is fixed:
|
|
103
92
|
|
|
104
93
|
```text
|
|
105
94
|
[Role] You are the main brain: read docs and code, dispatch workers, check results, update docs, report to me. You write no business code.
|
|
@@ -134,19 +123,19 @@ land_codex_worker checked, then landed on the integration branch
|
|
|
134
123
|
|
|
135
124
|
The last block was 25 steps. The main-brain session ran it end to end with nothing in its context but the brief and each worker's report. The tokens the workers burn are not on the main brain's bill.
|
|
136
125
|
|
|
137
|
-
"One worker per step, one commit per step, checked before the next" came from trying it the other way.
|
|
126
|
+
"One worker per step, one commit per step, checked before the next" came from trying it the other way. When a step is wrong, one `resume_codex_worker` asks for `--amend` into the same commit, the main brain checks again, then lands. A worker that did three steps cannot be fixed this way: when step 5 is wrong, steps 6 and 7 are already on top.
|
|
138
127
|
|
|
139
128
|
## What the board shows
|
|
140
129
|
|
|
141
130
|
| Where | What |
|
|
142
131
|
|---|---|
|
|
143
|
-
| Left column | One
|
|
144
|
-
| Session page |
|
|
145
|
-
| Worker
|
|
146
|
-
| Worker drawer |
|
|
147
|
-
|
|
|
132
|
+
| Left column | One row per session: title, worker count, how many running, last activity. Version and update notice at the bottom |
|
|
133
|
+
| Session page | Counts (total / running / done / failed / lost); while workers run, the command each one is on |
|
|
134
|
+
| Worker table | One row per worker: status, title, current command or last report line, duration, files changed, commands run |
|
|
135
|
+
| Worker drawer | Seven tabs: overview, report, changes, commands, events, task, side chat |
|
|
136
|
+
| Side chat | Ask the worker a question, the way Codex's `/btw` works: its thread is forked into a read-only side session, the running work is untouched. Multi-turn, stoppable, and a page that leaves picks up where it was |
|
|
148
137
|
|
|
149
|
-
|
|
138
|
+
Light and dark follow the system. No external resources.
|
|
150
139
|
|
|
151
140
|
## Tools
|
|
152
141
|
|
|
@@ -154,78 +143,53 @@ Nineteen.
|
|
|
154
143
|
|
|
155
144
|
| Tool | Arguments | What it does |
|
|
156
145
|
|---|---|---|
|
|
157
|
-
| `create_codex_worker` | `task`, `cwd`, **`ownedPaths`**, **`goal`**, `session_id`, `session_title`, `session_note`, `dependsOn`, `baseRef`, `sandbox`, `model`, `reasoningEffort`, `title`, `skipGitRepoCheck` | Start a worker. `
|
|
146
|
+
| `create_codex_worker` | `task`, `cwd`, **`ownedPaths`**, **`goal`**, `session_id`, `session_title`, `session_note`, `dependsOn`, `baseRef`, `sandbox`, `model`, `reasoningEffort`, `title`, `skipGitRepoCheck` | Start a worker. `baseRef` picks the commit the worktree is cut from (default `HEAD`); pass another worker's `codex/<id>` to build on it |
|
|
158
147
|
| `create_codex_followup_worker` | `task_id`, `followup_prompt`, `session_id`, plus the above | A new session seeded with the old worker's prompt, status and recent events |
|
|
159
148
|
| `resume_codex_worker` | `task_id`, `prompt` | Continue the same Codex conversation; `thread_id` stays |
|
|
160
|
-
| `wait_codex_workers` | `task_ids`, `mode` (any/all), `timeoutMinutes`, `timeoutMs`, `compact`, `includeEvents`, `eventLimit`, `eventMaxChars`, `eventKinds` | Wait for terminal states. Two minutes by default, then a snapshot
|
|
149
|
+
| `wait_codex_workers` | `task_ids`, `mode` (any/all), `timeoutMinutes`, `timeoutMs`, `compact`, `includeEvents`, `eventLimit`, `eventMaxChars`, `eventKinds` | Wait for terminal states. Two minutes by default, then a snapshot while the workers keep running; `compact` returns one line per worker |
|
|
161
150
|
| `get_orchestration_overview` | `status`, `limit` | Every worker in one table, capped at 7000 bytes. Carries `version` and `update` |
|
|
162
|
-
| `get_worker_result` | `task_id`, `limit`, `maxChars` | The worker's own full report plus `status` / `exit_code` / `changed_files
|
|
163
|
-
| `get_worker_diff` | `task_id`, `maxChars`, `paths` | What the worker actually changed: patches from the worktree's
|
|
164
|
-
| `ask_codex_worker` | `task_id`, `question`, `timeoutMs`, `maxChars`, `end` | Ask the worker on the side
|
|
165
|
-
| `land_codex_worker` | `task_id`, `onto` | Cherry-pick the worker's
|
|
151
|
+
| `get_worker_result` | `task_id`, `limit`, `maxChars` | The worker's own full report plus `status` / `exit_code` / `changed_files` |
|
|
152
|
+
| `get_worker_diff` | `task_id`, `maxChars`, `paths` | What the worker actually changed: patches from the worktree's start to its working tree, committed or not. `maxChars` bounds the answer; files past it are listed without a patch |
|
|
153
|
+
| `ask_codex_worker` | `task_id`, `question`, `timeoutMs`, `maxChars`, `fresh`, `end` | Ask the worker on the side. Its thread is forked into a read-only session with no network and no MCP tools; the worker itself is untouched. A resumed worker gets a new fork by itself, `fresh` forces one, `end` deletes it |
|
|
154
|
+
| `land_codex_worker` | `task_id`, `onto`, `commitMessage` | Cherry-pick the worker's `codex/<id>` commits onto the current branch of the directory it was dispatched from. Clean target only, a conflict rolls back. `commitMessage` first commits the worker's uncommitted edits as one commit |
|
|
166
155
|
| `get_worker_summary` | `task_id` | One paragraph: goal, status, changes, last command and message |
|
|
167
|
-
| `get_codex_worker_status` | `task_id`, `includePrompt`, `promptMaxChars` | One worker in detail
|
|
156
|
+
| `get_codex_worker_status` | `task_id`, `includePrompt`, `promptMaxChars` | One worker in detail |
|
|
168
157
|
| `get_codex_worker_events` | `task_id`, `limit`, `maxChars`, `kinds` | The raw event stream |
|
|
169
158
|
| `get_worker_goal` | `task_id` | The goal recorded at dispatch plus the native Codex goal (tokens, time) |
|
|
170
159
|
| `list_codex_workers` | `status`, `includeHistory`, `includeDetails` | List workers, active ones by default |
|
|
171
|
-
| `get_session_works` | `session_id` | Every worker of one session
|
|
172
|
-
| `describe_session` | `session_id`, `title`, `note` | Record a title and note
|
|
160
|
+
| `get_session_works` | `session_id` | Every worker of one session. The way back after a main-thread restart |
|
|
161
|
+
| `describe_session` | `session_id`, `title`, `note` | Record a title and note for a session |
|
|
173
162
|
| `search_works` | `query`, `limit` | Substring search over title / goal / prompt / last_message, newest first |
|
|
174
|
-
| `check_for_update` | `force` | Ask the registry for a newer version
|
|
175
|
-
| `cancel_codex_worker` | `task_id` | Stop a worker. Falls back to the pid
|
|
176
|
-
|
|
177
|
-
### The three things to always pass
|
|
178
|
-
|
|
179
|
-
- `ownedPaths`: the paths this worker may write. Checked against every running worker before dispatch; an overlap refuses the call with the conflicting `task_id` and no worktree is created. It is a dispatch-time check, not a runtime sandbox.
|
|
180
|
-
- `goal.objective`: one line on what the worker is for. The worker creates a native Codex goal from it and marks it complete when done.
|
|
181
|
-
- `session_id`: not required by the schema, but without it nothing groups the batch and neither the board nor `get_session_works` can find it again. Same value for the whole batch, and `session_title` on the first dispatch.
|
|
182
|
-
|
|
183
|
-
### Reading results without filling the context
|
|
184
|
-
|
|
185
|
-
| Want | Use | Cost |
|
|
186
|
-
|---|---|---|
|
|
187
|
-
| Status of every worker | `get_orchestration_overview` | 7000 bytes, hard cap |
|
|
188
|
-
| One worker's conclusion | `get_worker_result` | The full report, tens of thousands of characters for a big job |
|
|
189
|
-
| Alive or finished | `get_worker_summary` | A paragraph |
|
|
190
|
-
| What it did | `get_codex_worker_events` | Filter with `kinds`, bound with `limit`, clip with `maxChars` |
|
|
191
|
-
| What it actually changed | `get_worker_diff` | Capped by `maxChars`; the file list is always complete |
|
|
192
|
-
| Why it did that | `ask_codex_worker` | One answer; the fork carries the worker's whole context |
|
|
163
|
+
| `check_for_update` | `force` | Ask the registry for a newer version |
|
|
164
|
+
| `cancel_codex_worker` | `task_id` | Stop a worker. Falls back to the pid across processes, after confirming that pid runs codex |
|
|
193
165
|
|
|
194
|
-
|
|
166
|
+
Two are required: `ownedPaths` (checked against every running worker before dispatch, overlap refuses the call, dispatch-time only) and `goal.objective` (the worker turns it into a native Codex goal). Without `session_id` nothing groups the batch; use one value for the whole batch.
|
|
195
167
|
|
|
196
168
|
## How this differs from Claude Code subagents
|
|
197
169
|
|
|
198
|
-
File isolation is not the difference:
|
|
170
|
+
File isolation is not the difference: a subagent can open a worktree too. The difference is the model and the process.
|
|
199
171
|
|
|
200
172
|
| | Claude Code subagent | codex-supervisor worker |
|
|
201
173
|
|---|---|---|
|
|
202
|
-
|
|
|
174
|
+
| Model | Claude only | `model` passed to the Codex CLI; DeepSeek works |
|
|
203
175
|
| Who does the work | Claude Code itself | A separate `codex exec` process |
|
|
204
|
-
| Two
|
|
205
|
-
| Main
|
|
176
|
+
| Two writers on one file | Worktrees keep them apart, no path declaration | `ownedPaths` overlap is refused before dispatch |
|
|
177
|
+
| Main-thread process dies | Workers die with it | `thread_id` is in sqlite; `resume_codex_worker` picks the same conversation up |
|
|
206
178
|
| Who can drive it | Claude Code only | Any MCP client |
|
|
207
|
-
|
|
|
179
|
+
| Seeing the process | Only the returned conclusion | Raw JSONL and the web board |
|
|
208
180
|
|
|
209
181
|
## The state machine
|
|
210
182
|
|
|
211
|
-
`status`
|
|
212
|
-
|
|
213
|
-
| Value | Meaning |
|
|
183
|
+
| `status` | Meaning |
|
|
214
184
|
|---|---|
|
|
215
185
|
| `queued` | Dispatched, not started |
|
|
216
|
-
| `running` | Running |
|
|
217
|
-
| `completed` |
|
|
218
|
-
| `failed` | Non-zero exit, `turn.failed`,
|
|
186
|
+
| `running` | Running. `phase`: `starting → thinking → command → editing → reporting` |
|
|
187
|
+
| `completed` | Done |
|
|
188
|
+
| `failed` | Non-zero exit, `turn.failed`, spawn failure |
|
|
219
189
|
| `cancelled` | Stopped by `cancel_codex_worker` |
|
|
220
|
-
| `lost` | Killed by an outside signal,
|
|
221
|
-
|
|
222
|
-
`phase` has a value only while `running`: `starting → thinking → command → editing → reporting`.
|
|
223
|
-
|
|
224
|
-
`failed` sends you to the logs; `lost` means run it again. A terminal state lands in two steps: `turn.completed` sets `completed`, the process exit writes `exit_code`. `wait_codex_workers` waits for the second step; a direct status read that sees `completed` with `exit_code: null` is in the gap, read again.
|
|
225
|
-
|
|
226
|
-
Windows has no signals. An outside kill and the process calling `exit(1)` look the same to the parent, so there it reports `failed` with the exit code.
|
|
190
|
+
| `lost` | Killed by an outside signal, MCP process gone, or a row whose process never started. `resume_codex_worker` picks it up |
|
|
227
191
|
|
|
228
|
-
|
|
192
|
+
A terminal state lands in two steps: `turn.completed` sets `completed`, the process exit writes `exit_code`; `wait_codex_workers` returns only after the exit code is in. Windows has no signals, so an outside kill reports as `failed` with an exit code. Native Codex goals: `paused` / `blocked` count as `running` and go to `needs_attention`, `usageLimited` / `budgetLimited` as `failed`.
|
|
229
193
|
|
|
230
194
|
## Where state lives
|
|
231
195
|
|
|
@@ -233,42 +197,31 @@ Native Codex goal states map like this: `active` / `paused` / `blocked` are `run
|
|
|
233
197
|
|
|
234
198
|
| File | Content |
|
|
235
199
|
|---|---|
|
|
236
|
-
| `data/supervisor.sqlite` | `tasks` (one row per work), `task_events`
|
|
237
|
-
| `data/runs/<taskId>.jsonl` |
|
|
238
|
-
| `data/update-check.json` |
|
|
239
|
-
| `worktrees/<taskId>/` |
|
|
240
|
-
|
|
241
|
-
`changed_files` has three sources: Codex's `file_change` events; `git status --porcelain` in the worktree (uncommitted); `git diff --name-only <base_commit> HEAD` (committed). The last two exist because a worker editing through the shell emits no `file_change` event, and once it commits `git status` is clean again. A real batch of five did exactly that and every read came back empty. `base_commit` is recorded at dispatch; older rows fall back to the oldest reflog entry of the branch. Every git read passes `core.quotePath=false`, so non-ASCII file names come back as written instead of octal-escaped.
|
|
242
|
-
|
|
243
|
-
A 0.1.x database migrates itself the first time it is opened, without losing a row.
|
|
244
|
-
|
|
245
|
-
## Update check
|
|
246
|
-
|
|
247
|
-
When the MCP process starts it asks the npm registry which version is `latest` and what that tarball's integrity is, then compares two things with the install:
|
|
248
|
-
|
|
249
|
-
- The version. If it is behind, `get_orchestration_overview`, the dispatch receipt and the `wait_codex_workers` response gain an `update` field with `latest_version` and `npm i -g codex-supervisor-mcp@latest`. The skill tells the main thread to pass that on.
|
|
250
|
-
- The files. A global install records the unpacked tarball's integrity in `node_modules/.package-lock.json`; if it differs from the registry's value for that version, the files on disk are not the published build and the notice says to reinstall. A git checkout has no such value and reports its commit.
|
|
200
|
+
| `data/supervisor.sqlite` | `tasks` (one row per work), `task_events`, `sessions`, `side_sessions` / `side_turns` (side chat) |
|
|
201
|
+
| `data/runs/<taskId>.jsonl` | Raw `codex --json` output |
|
|
202
|
+
| `data/update-check.json`, `auto-update.json` | Update check and background update records |
|
|
203
|
+
| `worktrees/<taskId>/` | The worker's Git worktree |
|
|
251
204
|
|
|
252
|
-
|
|
205
|
+
`changed_files` is the worktree's real diff (`git status` plus `git diff <base_commit> HEAD`), so edits made through the shell and commits the worker made itself are both visible. Git reads run with `core.quotePath=false`, so non-ASCII file names come back as written. Databases from older versions migrate on first open.
|
|
253
206
|
|
|
254
207
|
## Environment variables
|
|
255
208
|
|
|
256
209
|
| Variable | Default | Effect |
|
|
257
210
|
|---|---|---|
|
|
258
|
-
| `SUPERVISOR_HOME` | `~/.codex-supervisor` | State root. The MCP and the board must
|
|
259
|
-
| `CODEX_HOME` | `~/.codex` | Read-only
|
|
260
|
-
| `CODEX_BIN` | `codex` | Path to the Codex CLI. The Windows `.cmd` shim is bypassed
|
|
211
|
+
| `SUPERVISOR_HOME` | `~/.codex-supervisor` | State root. The MCP and the board must point at the same one |
|
|
212
|
+
| `CODEX_HOME` | `~/.codex` | Read-only: the native `goals_1.sqlite` and the MCP config |
|
|
213
|
+
| `CODEX_BIN` | `codex` | Path to the Codex CLI. The Windows `.cmd` shim is bypassed |
|
|
261
214
|
| `GIT_BIN` | `git` | Path to git |
|
|
262
|
-
| `SUPERVISOR_WEB_PORT` / `SUPERVISOR_WEB_HOST` | `7877` / `127.0.0.1` |
|
|
215
|
+
| `SUPERVISOR_WEB_PORT` / `SUPERVISOR_WEB_HOST` | `7877` / `127.0.0.1` | Board address |
|
|
263
216
|
| `CODEX_SUPERVISOR_NO_UPDATE_CHECK` | unset | `1` disables the update check |
|
|
264
|
-
| `CODEX_SUPERVISOR_REGISTRY` | `https://registry.npmjs.org` | Registry for the update check |
|
|
217
|
+
| `CODEX_SUPERVISOR_REGISTRY` | `https://registry.npmjs.org` | Registry for the update check and the auto-update |
|
|
265
218
|
| `CODEX_SUPERVISOR_UPDATE_TIMEOUT_MS` | `4000` | How long to wait for the registry |
|
|
266
|
-
| `CODEX_SUPERVISOR_SKIP_SETUP` | unset | `1` skips the `postinstall` setup |
|
|
267
219
|
| `CODEX_SUPERVISOR_NO_AUTO_UPDATE` | unset | `1` turns the background auto-update off (notify only) |
|
|
268
220
|
| `CODEX_SUPERVISOR_SKIP_SKILL_SYNC` | unset | `1` turns the skill sync at server start off |
|
|
269
|
-
| `
|
|
221
|
+
| `CODEX_SUPERVISOR_SKIP_SETUP` | unset | `1` skips the `postinstall` setup |
|
|
222
|
+
| `CODEX_SUPERVISOR_NPM` | unset | npm for the auto-update; default is the one shipped with the running node |
|
|
270
223
|
|
|
271
|
-
|
|
224
|
+
GUI clients (Claude Desktop, Cursor, Windsurf) do not run `postinstall`: add this to their MCP config file, and since their `PATH` often lacks `codex`, give `CODEX_BIN` explicitly:
|
|
272
225
|
|
|
273
226
|
```json
|
|
274
227
|
{
|
|
@@ -282,123 +235,74 @@ A process started by a GUI client often has no `codex` on `PATH`; set `CODEX_BIN
|
|
|
282
235
|
}
|
|
283
236
|
```
|
|
284
237
|
|
|
285
|
-
##
|
|
286
|
-
|
|
287
|
-
### GUI clients
|
|
288
|
-
|
|
289
|
-
GUI clients do not run `postinstall`; add the JSON above to the config file:
|
|
290
|
-
|
|
291
|
-
| Client | macOS | Windows | Linux |
|
|
292
|
-
|---|---|---|---|
|
|
293
|
-
| Claude Desktop | `~/Library/Application Support/Claude/claude_desktop_config.json` | `%APPDATA%\Claude\claude_desktop_config.json` | `~/.config/Claude/claude_desktop_config.json` |
|
|
294
|
-
| Cursor | `~/.cursor/mcp.json` | `%APPDATA%\Cursor\mcp.json` | `~/.config/cursor/mcp.json` |
|
|
295
|
-
| Windsurf | `~/.codeium/windsurf/mcp_config.json` | `%APPDATA%\Codeium\windsurf\mcp_config.json` | `~/.config/.codeium/windsurf/mcp_config.json` |
|
|
296
|
-
|
|
297
|
-
### Running the setup again
|
|
298
|
-
|
|
299
|
-
```bash
|
|
300
|
-
codex-supervisor-setup # detect clients, install the skill, register the MCP
|
|
301
|
-
codex-supervisor-setup --target claude,codex
|
|
302
|
-
codex-supervisor-setup --skill-only
|
|
303
|
-
codex-supervisor-setup --mcp-only
|
|
304
|
-
codex-supervisor-setup --dry-run # print the plan only
|
|
305
|
-
```
|
|
306
|
-
|
|
307
|
-
An existing skill with different content is backed up to `SKILL.md.bak-<timestamp>` before it is overwritten.
|
|
238
|
+
## Updating
|
|
308
239
|
|
|
309
|
-
|
|
240
|
+
Nothing to do by hand. The server asks the registry in the background at start (then every six hours); when a newer version is published it starts a detached process that runs `npm i -g` into the same global path. The running session is untouched; the next session starts on the new version. Progress lands in `data/auto-update.json` and in `update.auto_update` on tool results. Only a copy that `npm i -g` installed is touched; a git checkout, an `npm link` or an `npx` copy is left alone, and each version is attempted once.
|
|
310
241
|
|
|
311
|
-
|
|
242
|
+
The skill takes care of itself too: every server start copies the bundled skill into whichever skill directories exist, backing up a differing file as `SKILL.md.bak-<timestamp>`. A session that already loaded the skill sees the new text after loading it again.
|
|
312
243
|
|
|
313
|
-
|
|
244
|
+
Where the global directory needs sudo the install fails, the `update` field says why, and `npm install -g codex-supervisor-mcp@latest` by hand still works. Versions up to 0.6.1 only notify; upgrade by hand once and it is automatic from then on. Switching Node versions breaks the registered absolute path: `claude mcp remove -s user codex-supervisor` and `codex mcp remove codex-supervisor` first, then install. To run the setup again: `codex-supervisor-setup` (`--skill-only` / `--mcp-only` / `--dry-run`).
|
|
314
245
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
```bash
|
|
318
|
-
npm install -g codex-supervisor-mcp@latest
|
|
319
|
-
```
|
|
320
|
-
|
|
321
|
-
Versions up to 0.6.1 only notify and never install. Coming from one of those, upgrade by hand once; after that it is automatic. No re-registration needed.
|
|
322
|
-
|
|
323
|
-
Manual-update pitfalls:
|
|
324
|
-
|
|
325
|
-
- The registry takes a few minutes to move `latest` after a publish. If the version did not change, wait, or pin the version.
|
|
326
|
-
- Switching Node versions breaks the registered absolute path. Run `claude mcp remove -s user codex-supervisor` and `codex mcp remove codex-supervisor` first, then install.
|
|
327
|
-
- The skill takes care of itself: every server start copies the bundled skill into whichever of `~/.claude/skills/`, `~/.agents/skills/` and `~/.codex/skills/` already exist, backing up a differing file as `SKILL.md.bak-<timestamp>`. A session that already loaded the skill sees the new text only after loading it again. `CODEX_SUPERVISOR_SKIP_SKILL_SYNC=1` turns the sync off.
|
|
328
|
-
|
|
329
|
-
### Uninstall
|
|
246
|
+
Uninstall:
|
|
330
247
|
|
|
331
248
|
```bash
|
|
332
249
|
npm uninstall -g codex-supervisor-mcp
|
|
333
250
|
claude mcp remove -s user codex-supervisor
|
|
334
251
|
codex mcp remove codex-supervisor
|
|
335
|
-
rm -rf ~/.claude/skills/codex-supervisor ~/.agents/skills/codex-supervisor ~/.codex/skills/codex-supervisor
|
|
336
|
-
rm -rf ~/.codex-supervisor
|
|
252
|
+
rm -rf ~/.claude/skills/codex-supervisor ~/.agents/skills/codex-supervisor ~/.codex/skills/codex-supervisor ~/.codex-supervisor
|
|
337
253
|
```
|
|
338
254
|
|
|
339
|
-
|
|
255
|
+
## Windows
|
|
340
256
|
|
|
341
|
-
- The npm-installed CLI is `codex.cmd`,
|
|
342
|
-
- Cross-process cancel
|
|
343
|
-
-
|
|
257
|
+
- The npm-installed CLI is `codex.cmd`, which Node refuses to spawn directly. The runner steps over it to `node_modules/@openai/codex/bin/codex.js` and runs that with `node`; no `shell: true`, which would leave only the shell killable on cancel.
|
|
258
|
+
- Cross-process cancel uses `taskkill /PID <pid> /T /F` for the whole tree, after confirming that pid runs codex.
|
|
259
|
+
- Besides `PATH`, `%APPDATA%\npm`, `%LOCALAPPDATA%\pnpm`, `%LOCALAPPDATA%\Volta\bin` and `%ProgramFiles%\nodejs` are probed.
|
|
344
260
|
|
|
345
|
-
|
|
261
|
+
## Troubleshooting
|
|
346
262
|
|
|
347
263
|
| Symptom | Cause | Fix |
|
|
348
264
|
|---|---|---|
|
|
349
265
|
| Not in `claude mcp list` | The install method skipped `postinstall` | `codex-supervisor-setup`, or `claude mcp add` by hand |
|
|
350
266
|
| Dispatch says `codex only resolved to a shell shim` | Windows found only the `.cmd`; the package entry behind it is gone | Reinstall `@openai/codex`, or point `CODEX_BIN` at `codex.js` |
|
|
351
|
-
| Worker
|
|
267
|
+
| Worker `failed` at once with `spawn codex ENOENT` | No codex on the process `PATH` | Set `CODEX_BIN` in the config |
|
|
352
268
|
| `Cannot find module 'node:sqlite'` | Node older than 22.13.0 | Upgrade Node |
|
|
353
|
-
| Worker
|
|
269
|
+
| Worker `lost` | The MCP process was killed and took the worker with it | `resume_codex_worker` |
|
|
270
|
+
| Worker reports `git add` failing with `index.lock: Operation not permitted` | The default sandbox keeps `.git` read-only | `land_codex_worker` with `commitMessage`, or dispatch with `danger-full-access` |
|
|
354
271
|
| `ownedPaths overlap with active worker(s)` | Two workers claimed the same paths | Split differently, or cancel the one holding them |
|
|
355
|
-
| The board is empty | The board and the MCP use different `SUPERVISOR_HOME`s | Start it inside
|
|
356
|
-
| `port 7877 ... is already in use` | A board is already running | Open
|
|
272
|
+
| The board is empty | The board and the MCP use different `SUPERVISOR_HOME`s | Start it inside the project with the `.mcp.json`, or pass the same `SUPERVISOR_HOME` |
|
|
273
|
+
| `port 7877 ... is already in use` | A board is already running | Open it, or start another with `SUPERVISOR_WEB_PORT=8080` |
|
|
357
274
|
|
|
358
275
|
## Known limitations
|
|
359
276
|
|
|
360
|
-
- A worker
|
|
361
|
-
-
|
|
362
|
-
-
|
|
363
|
-
-
|
|
364
|
-
-
|
|
365
|
-
-
|
|
366
|
-
-
|
|
367
|
-
- `search_works` is substring matching
|
|
277
|
+
- A worker is a child of the MCP process. Kill the MCP and the worker goes with it, settled as `lost`; its worktree and `thread_id` survive and `resume_codex_worker` picks it up. Keeping it alive across that takes a resident daemon; see the Roadmap.
|
|
278
|
+
- In the default `workspace-write` sandbox a worker cannot commit (Codex keeps `.git` read-only). Either `land_codex_worker` with `commitMessage` commits for it, or dispatch with `danger-full-access`.
|
|
279
|
+
- The worktree is cut from a commit; uncommitted work in your checkout is not in it.
|
|
280
|
+
- Only the working directory is isolated. Temp directories, databases and ports are shared.
|
|
281
|
+
- `ownedPaths` is checked at dispatch only; it does not stop a worker from creating files outside its list. Read the diff.
|
|
282
|
+
- It knows "finished", not "correct". Acceptance is the main thread's job.
|
|
283
|
+
- One `wait_codex_workers` cannot wait to the end; the client's MCP tool timeout is a hard wall. Call it again.
|
|
284
|
+
- `search_works` is substring matching, fine for hundreds of works.
|
|
368
285
|
|
|
369
286
|
## Roadmap
|
|
370
287
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
6. ~~`session_id` + `get_session_works`~~ ✅
|
|
377
|
-
7. ~~`search_works`~~ ✅
|
|
378
|
-
8. ~~Native worker goals~~ ✅
|
|
379
|
-
9. ~~Windows~~ ✅
|
|
380
|
-
10. ~~Web board~~ ✅
|
|
381
|
-
11. ~~Session titles, update check, `baseRef`, committed changes visible~~ ✅
|
|
382
|
-
12. ~~Collecting work: `get_worker_diff` / `ask_codex_worker` / `land_codex_worker`; background auto-update~~ ✅
|
|
383
|
-
13. Resident daemon: move dispatch and process lifetime out of the MCP process
|
|
384
|
-
|
|
385
|
-
Not planned: vector search (substring matching is faster at this scale and costs nothing to maintain), `usage_count` ordering (2 of 80 real works were ever referenced again), a layered memory index (not enough data to need one).
|
|
288
|
+
Done: `CODEX_BIN` / `SUPERVISOR_HOME` / `GIT_BIN`; `status` and `phase` split; `ownedPaths` / `goal` / `dependsOn`; `thread_id` on disk + `resume_codex_worker`; concurrency and multi-process writes; `session_id`, `search_works`, native goals; Windows; the web board; `baseRef`; collecting work with `get_worker_diff` / `ask_codex_worker` / `land_codex_worker`; background auto-update.
|
|
289
|
+
|
|
290
|
+
Next: a resident daemon, moving dispatch and process lifetime out of the MCP process.
|
|
291
|
+
|
|
292
|
+
Not planned: vector search (substring matching is faster at this scale and costs nothing to maintain), `usage_count` ordering (2 of 80 real works were ever referenced again).
|
|
386
293
|
|
|
387
294
|
## Development
|
|
388
295
|
|
|
389
296
|
```bash
|
|
390
297
|
npm install
|
|
391
|
-
npm test #
|
|
392
|
-
npm run test:edge # test/edge only
|
|
393
|
-
npm run test:real # end to end
|
|
394
|
-
npm run
|
|
395
|
-
npm run
|
|
396
|
-
npm run web:install # board dependencies
|
|
397
|
-
npm run web:dev # board with hot reload, /api proxied to 7877
|
|
398
|
-
npm run web:build # bundle into web/dist; runs before publish
|
|
298
|
+
npm test # fake-codex replay, fast and deterministic
|
|
299
|
+
npm run test:edge # test/edge only
|
|
300
|
+
npm run test:real # end to end against the real codex CLI
|
|
301
|
+
npm run web:dev # board development, /api proxied to 7877
|
|
302
|
+
npm run web:build # bundle to web/dist, runs before npm publish
|
|
399
303
|
```
|
|
400
304
|
|
|
401
|
-
|
|
305
|
+
CI runs Ubuntu / macOS / Windows, plus a Node 22.13.0 job that pins the `engines` floor.
|
|
402
306
|
|
|
403
307
|
## License
|
|
404
308
|
|