codex-supervisor-mcp 0.7.2 → 0.8.0

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 CHANGED
@@ -8,19 +8,22 @@ English | [中文](README.md)
8
8
  [![CI](https://github.com/zriyox/codex-supervisor-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/zriyox/codex-supervisor-mcp/actions/workflows/ci.yml)
9
9
  [![node](https://img.shields.io/badge/node-%3E%3D22.13.0-339933.svg)](package.json)
10
10
 
11
- **codex-supervisor-mcp** is a Codex MCP server: let one main thread (Claude Code, Codex, or any MCP client) run several Codex CLI workers at once. One Git worktree per worker, every state change on disk, and a web board to watch the batch.
11
+ Website [codex-supervisor.zriyo.com](https://codex-supervisor.zriyo.com) · for models [llms.txt](https://codex-supervisor.zriyo.com/llms.txt)
12
12
 
13
- ![Demo: one Claude Code main thread dispatches three Codex workers into separate worktrees, waits, and merges the result](https://raw.githubusercontent.com/zriyox/codex-supervisor-mcp/main/assets/demo.gif)
13
+ Point several agents at one repository and they overwrite each other, nobody can say who changed what, and the main thread's context fills up with worker output.
14
+
15
+ **codex-supervisor-mcp** is a Codex MCP server that takes dispatch and bookkeeping out of the model's context and puts them on disk: one main thread (Claude Code, Codex, or any MCP client) runs several Codex CLI workers at once, one Git worktree per worker, state in SQLite, a web board on top.
14
16
 
15
- *30 seconds, recorded live: the main thread calls `create_codex_worker` three times, the workers run in parallel in their own worktrees, the main thread collects three diffs and makes one commit.*
17
+ ![Demo: one Claude Code main thread dispatches three Codex workers into separate worktrees, waits, and merges the result](https://raw.githubusercontent.com/zriyox/codex-supervisor-mcp/main/assets/demo.gif)
16
18
 
17
- ## What it is
19
+ *30 seconds, recorded live: `create_codex_worker` ×3, three workers in their own worktrees in parallel, the main thread collects three diffs and makes one commit.*
18
20
 
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:
21
+ ## What it solves
20
22
 
21
23
  | Problem | What it does |
22
24
  |---|---|
23
25
  | Workers trample each other's files | One Git worktree per worker, `ownedPaths` checked for overlap before dispatch |
26
+ | A worker says it is done and it is not | Dispatch with `acceptance` commands; the supervisor runs them in the worktree after the worker exits, and `land` refuses while they fail |
24
27
  | Worker output floods the main thread | Events go to `data/runs/<taskId>.jsonl`; reads are gated by `limit` / `maxChars` / `kinds` |
25
28
  | One status read fills the context | `get_orchestration_overview` fits every worker into 7000 bytes |
26
29
  | Nobody knows who is still running after a restart | `supervisor.sqlite`, one row per work, with `thread_id` |
@@ -28,7 +31,7 @@ Point several agents at one repository and they overwrite each other, and nobody
28
31
  | "Failed" and "process gone" look alike | The state machine keeps `failed` and `lost` apart |
29
32
  | No view of where a batch is | `codex-supervisor-web`, a board that shows every worker by session |
30
33
 
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.
34
+ Workers run `codex exec` with `model` passed through: the main thread stays on Claude, workers can run DeepSeek or any model Codex has a provider for, and the bills stay separate.
32
35
 
33
36
  ## Five minutes to a running batch
34
37
 
@@ -40,14 +43,14 @@ Prerequisites: Node.js 22.13.0 or newer, `codex` on `PATH`. macOS, Linux and Win
40
43
  npm install -g codex-supervisor-mcp
41
44
  ```
42
45
 
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:
46
+ `postinstall` installs the skill and registers the MCP. If `claude mcp list` does not show it (`npx`, pnpm and `--ignore-scripts` skip `postinstall`), add it by hand:
44
47
 
45
48
  ```bash
46
49
  claude mcp add -s user codex-supervisor -- npx -y codex-supervisor-mcp
47
50
  codex mcp add codex-supervisor -- npx -y codex-supervisor-mcp
48
51
  ```
49
52
 
50
- Restart Claude Code / Codex. Updates take care of themselves from here; see "Updating".
53
+ Restart Claude Code / Codex. Updates take care of themselves from here; see "Updating". For the skill alone: `npx skills add zriyox/codex-supervisor-mcp`.
51
54
 
52
55
  ### 2. Dispatch a batch
53
56
 
@@ -60,7 +63,7 @@ What the main thread does underneath (you can call the tools yourself):
60
63
  ```
61
64
  create_codex_worker ×3 each with session_id, session_title, ownedPaths, goal
62
65
  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
66
+ get_worker_result ×3 each worker's report, with the commands it really ran
64
67
  ```
65
68
 
66
69
  Each worker's changes sit on its own `codex/<taskId>` branch; whether and how to merge is the main thread's call.
@@ -73,13 +76,11 @@ codex-supervisor-web
73
76
  npx -p codex-supervisor-mcp codex-supervisor-web
74
77
  ```
75
78
 
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.
79
+ Open `http://127.0.0.1:7877`. The state directory is `SUPERVISOR_HOME`, else the nearest `.mcp.json`, else `~/.codex-supervisor`; `SUPERVISOR_WEB_PORT` changes the port. The board only shows; it never dispatches or cancels.
77
80
 
78
81
  ## How I use it
79
82
 
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.
81
-
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.
83
+ Anything that speaks MCP can be the main thread; this is just my way. 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.
83
84
 
84
85
  | Who | Where | Does what |
85
86
  |---|---|---|
@@ -88,7 +89,7 @@ I run two Claude Code sessions, one for documents and one for dispatch. A sessio
88
89
  | 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 |
89
90
  | Codex workers | Their own worktrees | One worker per step, one commit per step, build and verify on a remote machine. No push, no merge |
90
91
 
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:
92
+ One block of text passes between the two sessions, pasted into the main-brain session and handed over with `/goal`. Its shape is fixed:
92
93
 
93
94
  ```text
94
95
  [Role] You are the main brain: read docs and code, dispatch workers, check results, update docs, report to me. You write no business code.
@@ -101,6 +102,7 @@ One block of text passes between the two sessions: the planning session writes i
101
102
  One session_id for the whole batch
102
103
  Serial when steps touch the same files, parallel only when ownedPaths do not overlap
103
104
  One worker per step. Write the task in full: background, where in the docs, files to change, verify command, output format
105
+ Put the verify command in acceptance too; the supervisor runs it, the worker's word does not count
104
106
  Read the diff when a worker returns. Its word is not enough; what you see is
105
107
  [Build/test] Everything on the remote machine, nothing locally
106
108
  [Red lines] What not to change, push or read
@@ -114,16 +116,16 @@ What the main brain calls in one round:
114
116
  search_works has this batch been dispatched before
115
117
  create_codex_worker one worker per step, same session_id, ownedPaths disjoint
116
118
  wait_codex_workers two minutes a round, compact: true, call again until done
117
- get_worker_result what it says it did
119
+ get_worker_result what it says it did; verification is what it really ran
118
120
  get_worker_diff what it actually did
119
121
  ask_codex_worker when the two differ, ask why; read-only, its thread untouched
120
- resume_codex_worker when it must change something, one follow-up, amended into the same commit
122
+ resume_codex_worker when it must change something, one follow-up, amended into the same commit; rebaseOnto when main has moved
121
123
  land_codex_worker checked, then landed on the integration branch
122
124
  ```
123
125
 
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.
126
+ The last block was 25 steps. One main-brain session watched all 25, with nothing in its context but the brief and each worker's report; the workers' output never reached it.
125
127
 
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.
128
+ Why one worker does one step: when step 5 is wrong, the worker that did step 5 gets one `resume_codex_worker`, amends its own commit, the main brain checks again, and only then lands it. A worker that did steps 5, 6 and 7 cannot be fixed that way: 6 and 7 already sit on top of 5, so fixing 5 means redoing them too.
127
129
 
128
130
  ## What the board shows
129
131
 
@@ -143,15 +145,15 @@ Nineteen.
143
145
 
144
146
  | Tool | Arguments | What it does |
145
147
  |---|---|---|
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 |
148
+ | `create_codex_worker` | `task`, `cwd`, **`ownedPaths`**, **`goal`**, `acceptance`, `session_id`, `session_title`, `session_note`, `dependsOn`, `baseRef`, `sandbox`, `model`, `reasoningEffort`, `title`, `skipGitRepoCheck` | Start a worker. `acceptance` lists the commands the supervisor runs in the worktree once the worker exits; exit 0 on every one passes. `baseRef` picks the commit the worktree is cut from (default `HEAD`); pass another worker's `codex/<id>` to build on it |
147
149
  | `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 |
148
- | `resume_codex_worker` | `task_id`, `prompt` | Continue the same Codex conversation; `thread_id` stays |
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 |
150
+ | `resume_codex_worker` | `task_id`, `prompt`, `rebaseOnto`, `acceptance` | Continue the same Codex conversation; `thread_id` stays. `rebaseOnto` first moves the worktree onto the project's newer commit (stash, replay its own commits, unstash); a conflict puts it back and does not start the worker |
151
+ | `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 with `idle_seconds` / `command_running`, so a long command and a stuck worker look different |
150
152
  | `get_orchestration_overview` | `status`, `limit` | Every worker in one table, capped at 7000 bytes. Carries `version` and `update` |
151
- | `get_worker_result` | `task_id`, `limit`, `maxChars` | The worker's own full report plus `status` / `exit_code` / `changed_files` |
153
+ | `get_worker_result` | `task_id`, `limit`, `maxChars`, `includeFiles` | The worker's own report, clipped past 6000 bytes with `truncated` and the size to ask for. `acceptance` is whether the supervisor's own checks passed, `verification` the commands the worker ran with exit codes, `base_behind` how far main has moved |
152
154
  | `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
155
  | `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 |
156
+ | `land_codex_worker` | `task_id`, `onto`, `commitMessage`, `ignoreAcceptance` | Cherry-pick the worker's `codex/<id>` commits onto the current branch of the dispatch directory: clean target only, a conflict rolls back, a failed acceptance is refused. `commitMessage` first commits its uncommitted edits as one commit; `ignoreAcceptance` lands anyway |
155
157
  | `get_worker_summary` | `task_id` | One paragraph: goal, status, changes, last command and message |
156
158
  | `get_codex_worker_status` | `task_id`, `includePrompt`, `promptMaxChars` | One worker in detail |
157
159
  | `get_codex_worker_events` | `task_id`, `limit`, `maxChars`, `kinds` | The raw event stream |
@@ -202,7 +204,7 @@ A terminal state lands in two steps: `turn.completed` sets `completed`, the proc
202
204
  | `data/update-check.json`, `auto-update.json` | Update check and background update records |
203
205
  | `worktrees/<taskId>/` | The worker's Git worktree |
204
206
 
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.
207
+ `changed_files` is the worktree's real diff, so shell edits and the worker's own commits are both visible. Non-ASCII file names come back as written. Databases from older versions migrate on first open.
206
208
 
207
209
  ## Environment variables
208
210
 
@@ -237,11 +239,9 @@ GUI clients (Claude Desktop, Cursor, Windsurf) do not run `postinstall`: add thi
237
239
 
238
240
  ## Updating
239
241
 
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.
242
+ Nothing to do by hand. At start the server asks the registry in the background; a newer version is installed by a detached `npm i -g` into the same global path, the running session is untouched and the next session starts on it. Only a copy that `npm i -g` installed is touched; a git checkout or an `npx` copy is left alone. The skill does the same: every start copies it into the existing skill directories, backing up an edited file as `SKILL.md.bak-<timestamp>`.
241
243
 
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.
243
-
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`).
244
+ When the install fails (a global directory that needs sudo) 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. A Node version switch breaks the registered path: `claude mcp remove -s user codex-supervisor`, `codex mcp remove codex-supervisor`, reinstall. To run the setup again: `codex-supervisor-setup` (`--skill-only` / `--mcp-only` / `--dry-run`).
245
245
 
246
246
  Uninstall:
247
247
 
@@ -279,7 +279,7 @@ rm -rf ~/.claude/skills/codex-supervisor ~/.agents/skills/codex-supervisor ~/.co
279
279
  - The worktree is cut from a commit; uncommitted work in your checkout is not in it.
280
280
  - Only the working directory is isolated. Temp directories, databases and ports are shared.
281
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.
282
+ - Acceptance checks exactly what `acceptance` says. Anything not written there is not checked; `verification` is only what the worker ran itself, and the rest is the main thread reading the diff.
283
283
  - One `wait_codex_workers` cannot wait to the end; the client's MCP tool timeout is a hard wall. Call it again.
284
284
  - `search_works` is substring matching, fine for hundreds of works.
285
285
 
@@ -304,6 +304,10 @@ npm run web:build # bundle to web/dist, runs before npm publish
304
304
 
305
305
  CI runs Ubuntu / macOS / Windows, plus a Node 22.13.0 job that pins the `engines` floor.
306
306
 
307
+ ## Contributing
308
+
309
+ See [CONTRIBUTING.en.md](CONTRIBUTING.en.md). Security issues go through the [private advisory form](https://github.com/zriyox/codex-supervisor-mcp/security/advisories/new); see [SECURITY.md](SECURITY.md).
310
+
307
311
  ## License
308
312
 
309
313
  MIT
package/README.md CHANGED
@@ -8,15 +8,17 @@
8
8
  [![CI](https://github.com/zriyox/codex-supervisor-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/zriyox/codex-supervisor-mcp/actions/workflows/ci.yml)
9
9
  [![node](https://img.shields.io/badge/node-%3E%3D22.13.0-339933.svg)](package.json)
10
10
 
11
- **codex-supervisor-mcp** 是一个 Codex MCP server:让一个主线程(Claude Code、Codex,或任何 MCP 客户端)同时指挥多个 Codex CLI worker 干活。一个 worker 一个 Git worktree,状态全部落盘,附一个网页看板盯进度。
11
+ 官网 [codex-supervisor.zriyo.com](https://codex-supervisor.zriyo.com) · 给模型读的 [llms.txt](https://codex-supervisor.zriyo.com/llms.txt)
12
12
 
13
- ![演示:一个 Claude Code 主线程同时派 3 个 Codex worker,各自独立 worktree,并行跑完后合并提交](https://raw.githubusercontent.com/zriyox/codex-supervisor-mcp/main/assets/demo.gif)
13
+ 让几个 agent 同时改一个仓库,结果是互相覆盖、没人说得清谁改了什么,主线程的上下文还被 worker 的输出塞满。
14
+
15
+ **codex-supervisor-mcp** 是一个 Codex MCP server,把「派单」和「记账」从模型上下文里拿出来放到磁盘上:一个主线程(Claude Code、Codex 或任何 MCP 客户端)同时指挥多个 Codex CLI worker,一个 worker 一个 Git worktree,状态落盘到 SQLite,附一个网页看板。
14
16
 
15
- *30 秒演示(真跑):主线程 `create_codex_worker` ×3,三个 worker 在各自 worktree 里并行干活,主线程收 3 份 diff 合成一次 commit。*
17
+ ![演示:一个 Claude Code 主线程同时派 3 个 Codex worker,各自独立 worktree,并行跑完后合并提交](https://raw.githubusercontent.com/zriyox/codex-supervisor-mcp/main/assets/demo.gif)
16
18
 
17
- ## 它是什么
19
+ *30 秒真跑:`create_codex_worker` ×3,三个 worker 各自 worktree 并行,主线程收 3 份 diff 合成一次 commit。*
18
20
 
19
- 直接让几个 agent 同时改一个仓库,结果是互相覆盖,没人说得清谁改了什么。这个 MCP 把「派单」和「记账」从模型上下文里拿出来,放到磁盘上:
21
+ ## 解决什么
20
22
 
21
23
  | 问题 | 做法 |
22
24
  |---|---|
@@ -26,9 +28,10 @@
26
28
  | 进程重启后不知道谁还在跑 | `supervisor.sqlite` 一行一个 work,带 `thread_id` |
27
29
  | 换个会话接不上之前的 worker | `resume_codex_worker` 走 `codex exec resume <thread_id>`,接的是同一个 Codex 会话 |
28
30
  | 分不清「跑失败」和「进程没了」 | 状态机把 `failed` 和 `lost` 分开 |
31
+ | worker 说做完了其实没有 | 派单给 `acceptance` 验收命令,worker 退出后 supervisor 在它的 worktree 里跑,失败 `land` 拒绝 |
29
32
  | 看不见一批活现在到哪了 | `codex-supervisor-web` 开一个看板,按 session 看每路 worker 在干什么 |
30
33
 
31
- worker 跑的是 `codex exec`,`model` 参数原样透传。主线程留在 Claude 上做判断,worker 可以挂 DeepSeek 或任何 Codex 配了 provider 的模型,账单分开算。
34
+ worker 跑的是 `codex exec`,`model` 透传:主线程留在 Claude,worker 可以挂 DeepSeek 或任何 Codex 配了 provider 的模型,账单分开算。
32
35
 
33
36
  ## 五分钟跑起来
34
37
 
@@ -40,14 +43,14 @@ worker 跑的是 `codex exec`,`model` 参数原样透传。主线程留在 Cla
40
43
  npm install -g codex-supervisor-mcp
41
44
  ```
42
45
 
43
- `postinstall` 会把 skill 装进 `~/.claude/skills/`、`~/.agents/skills/`、`~/.codex/skills/`,并用 `claude mcp add -s user` 和 `codex mcp add` 注册 MCP。`claude mcp list` 里没看到(`npx`、`--ignore-scripts`、pnpm 不跑 `postinstall`)就手动补:
46
+ `postinstall` 装 skill、注册 MCP。`claude mcp list` 里没看到(`npx`、pnpm、`--ignore-scripts` 不跑 `postinstall`)就手动补:
44
47
 
45
48
  ```bash
46
49
  claude mcp add -s user codex-supervisor -- npx -y codex-supervisor-mcp
47
50
  codex mcp add codex-supervisor -- npx -y codex-supervisor-mcp
48
51
  ```
49
52
 
50
- 重启 Claude Code / Codex。以后不用再手动更,见「更新」。
53
+ 重启 Claude Code / Codex。以后不用再手动更,见「更新」。只要 skill 不要 MCP:`npx skills add zriyox/codex-supervisor-mcp`。
51
54
 
52
55
  ### 2. 派第一批活
53
56
 
@@ -60,7 +63,7 @@ codex mcp add codex-supervisor -- npx -y codex-supervisor-mcp
60
63
  ```
61
64
  create_codex_worker ×3 每路带 session_id、session_title、ownedPaths、goal
62
65
  wait_codex_workers 默认等 2 分钟,到点返回快照,没完就接着等
63
- get_worker_result ×3 收每路的完整汇报和改动清单
66
+ get_worker_result ×3 收每路的汇报,带它真跑过的命令和退出码
64
67
  ```
65
68
 
66
69
  每路的改动在各自的 `codex/<taskId>` 分支上,合不合、怎么合由主线程定。
@@ -73,13 +76,11 @@ codex-supervisor-web
73
76
  npx -p codex-supervisor-mcp codex-supervisor-web
74
77
  ```
75
78
 
76
- 打开 `http://127.0.0.1:7877`。状态目录:有 `SUPERVISOR_HOME` 用它,没有就从当前目录往上找 `.mcp.json` 里的配置,再没有用 `~/.codex-supervisor`。端口用 `SUPERVISOR_WEB_PORT` 改,被占了会直接说。看板不派单也不取消。
79
+ 打开 `http://127.0.0.1:7877`。状态目录按 `SUPERVISOR_HOME`、最近的 `.mcp.json`、`~/.codex-supervisor` 的顺序找;端口用 `SUPERVISOR_WEB_PORT` 改。看板只看,不派单不取消。
77
80
 
78
81
  ## 我自己怎么用
79
82
 
80
- 这个 MCP 不挑主线程:Claude Code、Codex、Cursor,能连 MCP 的都能派活;worker 用什么模型看你给 Codex 配了哪个 provider。下面是我的用法,不是唯一用法。
81
-
82
- 我开两个 Claude Code 会话,一个只管文档,一个只管派活。一个会话又写详设又盯 worker,上下文两小时就满。
83
+ 能连 MCP 的都能当主线程,这里只是我的用法。我开两个 Claude Code 会话,一个只管文档,一个只管派活:一个会话又写详设又盯 worker,上下文两小时就满。
83
84
 
84
85
  | 谁 | 开在哪 | 管什么 |
85
86
  |---|---|---|
@@ -88,7 +89,7 @@ npx -p codex-supervisor-mcp codex-supervisor-web
88
89
  | 主脑会话 | 代码仓的一个 worktree | 读任务书,派 Codex worker,核每路的 diff,把结果填回任务书,向我汇报。不写业务代码 |
89
90
  | Codex worker | 各自的 worktree | 一个 worker 做一步,一个提交,在远端机器上编译和验证。不 push,不合并 |
90
91
 
91
- 两个会话之间只传一段文字:规划会话写好,我粘进主脑会话,用 `/goal` 接上。结构固定:
92
+ 两个会话之间只传一段文字,粘进主脑会话用 `/goal` 接上。结构固定:
92
93
 
93
94
  ```text
94
95
  【角色】 你是主脑:读文档和代码,派 worker,核结果,更新文档,向我汇报。不写业务代码。
@@ -101,6 +102,7 @@ npx -p codex-supervisor-mcp codex-supervisor-web
101
102
  整批用同一个 session_id
102
103
  改同一批文件就串行,文件完全不重叠才并行,每路 ownedPaths 写清
103
104
  一个 worker 只做一步。task 写全:背景、文档出处、要改的文件、验证命令、输出格式
105
+ 验证命令同时填 acceptance,supervisor 替你跑,它说过了不算
104
106
  worker 交回来先看 diff。它说过了不算,你看到才算
105
107
  【构建和测试】全走远端机器,本机不跑
106
108
  【红线】 不改什么,不推什么,不读什么
@@ -114,16 +116,16 @@ npx -p codex-supervisor-mcp codex-supervisor-web
114
116
  search_works 查这批活派过没有
115
117
  create_codex_worker 一步一个 worker,同一个 session_id,ownedPaths 不重叠
116
118
  wait_codex_workers 2 分钟一轮,compact: true,没完接着调
117
- get_worker_result 它说自己做了什么
119
+ get_worker_result 它说自己做了什么,verification 里是它真跑过的命令
118
120
  get_worker_diff 它实际做了什么
119
121
  ask_codex_worker 对不上就问它为什么,只读,不动它的线程
120
- resume_codex_worker 要改就追一条,让它 amend 进原来那个提交
122
+ resume_codex_worker 要改就追一条,让它 amend 进原来那个提交;主线走远了带 rebaseOnto
121
123
  land_codex_worker 核过了,落进集成分支
122
124
  ```
123
125
 
124
- 上一块活 25 步,主脑会话从头跑到尾,上下文里只有任务书和每路的汇报。worker 烧的 token 不进主脑的账。
126
+ 上一块活 25 步,主脑会话一个人从第 1 步盯到第 25 步,上下文里只有任务书和每路交回来的汇报,没被 worker 的过程撑爆。
125
127
 
126
- 「一个 worker 一步、一步一个提交、核过才进下一步」是试出来的。某一步不对,`resume_codex_worker` 追一条让它 `--amend` 进原来那个提交,主脑再核一次,过了才落。一个 worker 做三步就没法这么修:第 5 步错了,第 6、7 步已经叠在上面。
128
+ 为什么一个 worker 只做一步:第 5 步做错了,让做第 5 步的那个 worker `resume_codex_worker` 一下,改完 `--amend` 并回它自己那个提交,主脑再核一次,过了才落进集成分支。要是一个 worker 连做了 5、6、7 三步,第 5 步错了就没法这样改,6 和 7 的提交已经叠在 5 上面,改 5 得连 6、7 一起重做。
127
129
 
128
130
  ## 看板里有什么
129
131
 
@@ -143,15 +145,15 @@ land_codex_worker 核过了,落进集成分支
143
145
 
144
146
  | 工具 | 入参 | 作用 |
145
147
  |---|---|---|
146
- | `create_codex_worker` | `task`, `cwd`, **`ownedPaths`**, **`goal`**, `session_id`, `session_title`, `session_note`, `dependsOn`, `baseRef`, `sandbox`, `model`, `reasoningEffort`, `title`, `skipGitRepoCheck` | 起一个 worker。`baseRef` 指定 worktree 从哪个提交切,默认 `HEAD`,接着另一路干就填它的 `codex/<id>` |
148
+ | `create_codex_worker` | `task`, `cwd`, **`ownedPaths`**, **`goal`**, `acceptance`, `session_id`, `session_title`, `session_note`, `dependsOn`, `baseRef`, `sandbox`, `model`, `reasoningEffort`, `title`, `skipGitRepoCheck` | 起一个 worker。`acceptance` 是验收命令,worker 退出后 supervisor 在它的 worktree 里跑,退出码 0 算过。`baseRef` 指定 worktree 从哪个提交切,默认 `HEAD`,接另一路填它的 `codex/<id>` |
147
149
  | `create_codex_followup_worker` | `task_id`, `followup_prompt`, `session_id`, 其余同上 | 开一个新会话,把老 worker 的 prompt、状态、近期事件拼进去 |
148
- | `resume_codex_worker` | `task_id`, `prompt` | 接同一个 Codex 会话继续跑,`thread_id` 不变 |
149
- | `wait_codex_workers` | `task_ids`, `mode`(any/all), `timeoutMinutes`, `timeoutMs`, `compact`, `includeEvents`, `eventLimit`, `eventMaxChars`, `eventKinds` | 等终态。默认 2 分钟,到点带快照返回,worker 照跑;`compact` 每路只回一行 |
150
+ | `resume_codex_worker` | `task_id`, `prompt`, `rebaseOnto`, `acceptance` | 接同一个 Codex 会话继续跑,`thread_id` 不变。`rebaseOnto` 先把 worktree 挪到主线新头(stash、重放它自己的提交、放回),冲突原样退回不起 worker |
151
+ | `wait_codex_workers` | `task_ids`, `mode`(any/all), `timeoutMinutes`, `timeoutMs`, `compact`, `includeEvents`, `eventLimit`, `eventMaxChars`, `eventKinds` | 等终态。默认 2 分钟,到点带快照返回,worker 照跑;`compact` 每路只回一行,带 `idle_seconds` / `command_running`,分得清长命令和卡住 |
150
152
  | `get_orchestration_overview` | `status`, `limit` | 全部 worker 的状态表,封顶 7000 字节。带 `version` 和 `update` |
151
- | `get_worker_result` | `task_id`, `limit`, `maxChars` | worker 自己的完整汇报,外加 `status` / `exit_code` / `changed_files` |
153
+ | `get_worker_result` | `task_id`, `limit`, `maxChars`, `includeFiles` | worker 自己的汇报,默认截 6000 字节、`truncated` 提示读全。`acceptance` 是 supervisor 替你跑的验收过没过,`verification` 是它自己跑过的命令和退出码,`base_behind` 是主线走了多远 |
152
154
  | `get_worker_diff` | `task_id`, `maxChars`, `paths` | worker 实际改了什么:从 worktree 起点到工作区的 patch,提交没提交都算。`maxChars` 管总量,超了的文件只列名 |
153
155
  | `ask_codex_worker` | `task_id`, `question`, `timeoutMs`, `maxChars`, `fresh`, `end` | 旁路问 worker 一句。线程 fork 成只读侧会话,没网络、没 MCP 工具,worker 本身不动。worker 被 resume 过会自动换新 fork,`fresh` 强制换,`end` 删 |
154
- | `land_codex_worker` | `task_id`, `onto`, `commitMessage` | 把 worker 在 `codex/<id>` 上的提交 cherry-pick 到派单目录的当前分支。目标必须干净,冲突就回滚。`commitMessage` 先替它把未提交的改动提交成一笔 |
156
+ | `land_codex_worker` | `task_id`, `onto`, `commitMessage`, `ignoreAcceptance` | 把 worker 在 `codex/<id>` 上的提交 cherry-pick 到派单目录的当前分支。目标要干净,冲突回滚,验收 `failed` 拒绝。`commitMessage` 先替它把未提交的改动提交成一笔,`ignoreAcceptance` 放行 |
155
157
  | `get_worker_summary` | `task_id` | 一段话:goal、状态、改动、最后一条命令和消息 |
156
158
  | `get_codex_worker_status` | `task_id`, `includePrompt`, `promptMaxChars` | 单个 worker 的状态细节 |
157
159
  | `get_codex_worker_events` | `task_id`, `limit`, `maxChars`, `kinds` | 原始事件流 |
@@ -202,7 +204,7 @@ land_codex_worker 核过了,落进集成分支
202
204
  | `data/update-check.json`、`auto-update.json` | 更新检查和后台更新的记录 |
203
205
  | `worktrees/<taskId>/` | 该 worker 的 Git worktree |
204
206
 
205
- `changed_files` 按 worktree 的真实 diff 算(`git status` 加 `git diff <base_commit> HEAD`),worker 用 shell 改文件、自己 commit 过都能看到。git 读操作都带 `core.quotePath=false`,中文文件名不会变成八进制转义。老版本的库第一次打开时自动迁移。
207
+ `changed_files` 按 worktree 的真实 diff 算,worker 用 shell 改的、自己 commit 过的都能看到。中文文件名原样返回。老版本的库第一次打开自动迁移。
206
208
 
207
209
  ## 环境变量
208
210
 
@@ -237,11 +239,9 @@ GUI 客户端(Claude Desktop、Cursor、Windsurf)不跑 `postinstall`,自
237
239
 
238
240
  ## 更新
239
241
 
240
- 不用手动更。server 启动时在后台问一次 registry(之后每 6 小时一次),有新版就起一个独立进程 `npm i -g` 到同一个全局路径。正在跑的会话不受影响,下一个新会话就是新版。过程记在 `data/auto-update.json`,工具返回的 `update.auto_update` 里也能看到。只对 `npm i -g` 装的那份生效,git 源码、`npm link`、`npx` 起的都不碰;同一个版本只试一次。
242
+ 不用手动更。server 启动时后台查一次 registry,有新版就起独立进程 `npm i -g` 到同一个全局路径;正在跑的会话不受影响,下一个新会话就是新版。只对 `npm i -g` 装的那份生效,git 源码和 `npx` 起的不碰。skill 也一样,每次启动刷到已有的 skill 目录,改过的先备份成 `SKILL.md.bak-<时间戳>`。
241
243
 
242
- skill 同样不用管:server 每次启动把自带的 skill 刷到已存在的那几个 skill 目录,内容不同先备份成 `SKILL.md.bak-<时间戳>`。已经加载了 skill 的会话要重新加载才看到新文本。
243
-
244
- 全局目录要 sudo 才能写的机器会装失败,`update` 字段里带原因,这时手动 `npm install -g codex-supervisor-mcp@latest`。0.6.1 及以前只提醒不自己装,手动升一次就进自动了。换了 Node 版本,注册的绝对路径失效,先 `claude mcp remove -s user codex-supervisor` 和 `codex mcp remove codex-supervisor` 再装。重跑安装:`codex-supervisor-setup`(`--skill-only` / `--mcp-only` / `--dry-run`)。
244
+ 装失败(全局目录要 sudo)时 `update` 字段带原因,手动 `npm install -g codex-supervisor-mcp@latest`。0.6.1 及以前只提醒不自动装,手动升一次就进自动了。换了 Node 版本注册的路径会失效,`claude mcp remove -s user codex-supervisor`、`codex mcp remove codex-supervisor` 后重装。重跑安装:`codex-supervisor-setup`(`--skill-only` / `--mcp-only` / `--dry-run`)。
245
245
 
246
246
  卸载:
247
247
 
@@ -279,7 +279,7 @@ rm -rf ~/.claude/skills/codex-supervisor ~/.agents/skills/codex-supervisor ~/.co
279
279
  - worktree 从一个提交切,你工作区里没 commit 的东西不在里面。
280
280
  - 只隔离工作目录。临时目录、数据库、端口是共用的。
281
281
  - `ownedPaths` 只在派单时查,拦不住 worker 新建清单外的文件。收活看 diff。
282
- - 只管「跑完了」不管「对不对」,验收得主线程自己做。
282
+ - 验收是 `acceptance` 里写了什么就查什么。没写的事它不会替你查,`verification` 只是 worker 自己跑过的命令,剩下的靠主线程看 diff。
283
283
  - 一次 `wait_codex_workers` 等不到底,客户端的 MCP 工具超时是硬墙,靠反复调。
284
284
  - `search_works` 是子串匹配,几百条够用。
285
285
 
@@ -304,6 +304,10 @@ npm run web:build # 打包到 web/dist,发 npm 前自动跑
304
304
 
305
305
  CI 跑 Ubuntu / macOS / Windows,另加一个 Node 22.13.0 的 job 卡 `engines` 下界。
306
306
 
307
+ ## 参与贡献
308
+
309
+ 看 [CONTRIBUTING.md](CONTRIBUTING.md)。安全问题走 [私密通道](https://github.com/zriyox/codex-supervisor-mcp/security/advisories/new),见 [SECURITY.md](SECURITY.md)。
310
+
307
311
  ## License
308
312
 
309
313
  MIT
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "name": "codex-supervisor-mcp",
3
- "version": "0.7.2",
3
+ "version": "0.8.0",
4
+ "mcpName": "io.github.zriyox/codex-supervisor-mcp",
4
5
  "type": "module",
5
6
  "description": "MCP server that dispatches and supervises parallel Codex CLI workers, one isolated Git worktree each, with a persisted work state machine.",
7
+ "homepage": "https://codex-supervisor.zriyo.com",
6
8
  "license": "MIT",
7
9
  "repository": {
8
10
  "type": "git",
9
11
  "url": "git+https://github.com/zriyox/codex-supervisor-mcp.git"
10
12
  },
11
- "homepage": "https://github.com/zriyox/codex-supervisor-mcp#readme",
12
13
  "bugs": {
13
14
  "url": "https://github.com/zriyox/codex-supervisor-mcp/issues"
14
15
  },
@@ -20,8 +20,9 @@ description: 把 Codex CLI 当并行 worker 派活、盯进度、收结果。用
20
20
 
21
21
  | 参数 | 怎么填 |
22
22
  |---|---|
23
- | `task` | 这一路具体干什么。要能直接开工,别写"优化一下" |
23
+ | `task` | 这一路具体干什么。要能直接开工,别写"优化一下"。汇报格式 supervisor 已经附在 task 后面(结论 / 验证 / 没做的),别再要它列改动文件,diff 自己看 |
24
24
  | `cwd` | 项目根目录。worker 在自己的 worktree 里干活,不动你的工作区 |
25
+ | `acceptance` | 这一步"做完了"的判据,shell 命令列表,worker 退出后 supervisor 在它的 worktree 里逐条跑,退出码 0 算过,worker 在 prompt 里看得到。任务书里的验证命令原样抄:查那个文件在不在、那个接口通不通、那个测试文件过不过。写能判这一步的,不写全仓回归;远端机器的检查包进 `ssh`。命令用 supervisor 自己的权限跑,等于你自己跑 |
25
26
  | `ownedPaths` | 必填。这路允许写的路径,和在跑的 worker 重叠会被拒。冲突是好事,说明该改拆法 |
26
27
  | `goal.objective` | 必填。一句话说目标,worker 会建成 Codex 原生 goal |
27
28
  | `session_id` | 同一批传同一个值。第一路顺手带 `session_title`(30 字内,看板和 `get_session_works` 显示它),漏了用 `describe_session` 补 |
@@ -32,19 +33,23 @@ description: 把 Codex CLI 当并行 worker 派活、盯进度、收结果。用
32
33
  等待的几条规矩:
33
34
 
34
35
  - 等待预算管这次调用,不管 worker。`still_running: true` 是等满了不是挂了,按 `next_step` 再调。
36
+ - 快照里 `idle_seconds` 是距上一条 Codex 事件多久,命令跑着和模型思考时 Codex 都不发事件。`command_running: true` 是长命令(`current_command` 是哪条),接着等;`command_running: false` 且 idle 超过 10 分钟,`get_codex_worker_events` 看最后几条,进程没了状态机会自己标 `lost`。
35
37
  - `timeoutMinutes` 别超过客户端的 MCP 工具超时,否则被掐的是这次调用。
36
38
  - **不要自己写 shell 循环 grep `data/runs/*.jsonl`**。进程被杀、`failed`、`lost`、`exit_code` 只有状态机知道,文件里没有;resume 过的 worker 文件里有多条 `turn.completed`;用户在终端里看到的是一行黑盒。
37
39
  - 想省上下文改调 `get_orchestration_overview`,封顶 7000 字节。
38
40
 
39
41
  ## 收活:先看证据,再问,再改,再落
40
42
 
41
- 1. `get_worker_result`:它说自己做了什么。`wait` 和 overview 里的 `last_message` 是截过的,结论必须走这里。
43
+ 0. 先看 `acceptance`(compact wait、overview 的 `acceptance_failed`、`get_worker_result.acceptance` 都有)。`failed`:不用读它的汇报,直接走第 4 步,把 `checks[].output_tail` 原样贴进 resume 的 prompt。`passed` 但它说没做成、goal 是 `blocked`:信命令不信它,去看 diff。命令本身写错了,resume 带新的 `acceptance` 换掉,别 `ignoreAcceptance`。`null` 是没配,退出码只说明没崩,对不对自己看。
44
+ 1. `get_worker_result`:它说自己做了什么。默认截到 6000 字节,`truncated: true` 就按 `next_step` 带 `maxChars` 读全。`verification` 是它真跑过的命令和退出码:说"测过了"但 `commands_run: 0`、说"没建成"但那条命令退出码是 0、`last_command_failed: true` 却说完成、说"环境问题"但 `failed[].output_tail` 里是代码报错,都打回(走第 4 步),别替它圆。`base_behind.behind > 0` 说明派单后主线往前走了,改之前先 rebase(第 4 步)。
42
45
  2. `get_worker_diff`:它实际做了什么。起点到工作区的全部改动,提交没提交都算;`maxChars` 管总量,`paths` 缩范围。它说过了不算,diff 对得上才算。
43
46
  3. 对不上、看不懂为什么:`ask_codex_worker` 带 `question` 问它。fork 出一个只读旁路,worker 自己的线程不动;fork 没网络没 MCP 工具,问"改了什么、为什么、在哪",别问要联网才能答的事。超时回 `running`,只带 `task_id` 再调拿答案。worker 被 resume 过后下一问自动换新 fork,`fresh: true` 强制换,问完 `end: true` 删。
44
- 4. 要它改:`resume_codex_worker`,写清问题在哪,让它改完 `git commit --amend --no-edit` 并进原来那个提交。旁路只读,改东西永远走 resume。
45
- 5. 过了:`land_codex_worker` 把 `codex/<id>` 上的提交 cherry-pick 到派单目录当前分支。目标脏了、分支不对、冲突都拒绝并原样退回。worker 没提交(默认沙箱提交不了)就带 `commitMessage`,supervisor 在它分支上替它提交一笔再落。
47
+ 4. 要它改:`resume_codex_worker`,写清问题在哪,让它改完 `git commit --amend --no-edit` 并进原来那个提交。旁路只读,改东西永远走 resume。主线往前走过(`base_behind.behind > 0`)就带 `rebaseOnto: "HEAD"`(在派单目录里解析):未提交的改动先 stash,它自己的提交重放到新头,stash 放回,`base_commit` 跟着动。冲突(`rebase_conflict` / `stash_conflict`)会原样退回、不起 worker、`files` 列冲突文件;这时让它先 `land_codex_worker` 带 `commitMessage` 提交成一笔再 rebase,或者重派一路 `baseRef` 填新头。
48
+ 5. 过了:`land_codex_worker` 把 `codex/<id>` 上的提交 cherry-pick 到派单目录当前分支。目标脏了、分支不对、冲突都拒绝并原样退回。worker 没提交(默认沙箱提交不了)就带 `commitMessage`,supervisor 在它分支上替它提交一笔再落。验收 `failed` 它会拒,修完再落;`ignoreAcceptance` 只在用户说了"就这样落"时用。
46
49
 
47
- 一批活全部到终态后:`get_orchestration_overview` 确认没有 `needs_attention`,再逐路走上面五步。合不合、怎么合由主线程定。
50
+ 一批活全部到终态后:`get_orchestration_overview` 确认没有 `needs_attention`、`acceptance_failed` 为空,再逐路走上面几步。合不合、怎么合由主线程定。
51
+
52
+ 高风险的步(迁移、改公共接口、"做完了"写不成命令的)再派一路 verifier:`sandbox: "read-only"`、`ownedPaths: []`,task 只给这一步的目标和原 worker 的 `worktree_path`,不给它的汇报,不说你怀疑什么,让它答"目标达成没有,证据是哪几行"。它不改东西,只读只跑。两路说法对不上,两边都别信,自己看 diff。
48
53
 
49
54
  ## 读结果别把上下文撑爆
50
55
 
@@ -52,10 +57,11 @@ description: 把 Codex CLI 当并行 worker 派活、盯进度、收结果。用
52
57
  |---|---|
53
58
  | 全部 worker 的状态 | `get_orchestration_overview` |
54
59
  | 一路的完整结论 | `get_worker_result` |
55
- | 一路改了什么 | `get_worker_diff` |
60
+ | 一路改了什么 | `get_worker_diff`;只要文件名用 `get_worker_result` 带 `includeFiles: true` |
56
61
  | 活着还是完了 | `get_worker_summary` |
57
62
  | 过程 | `get_codex_worker_events`,`kinds` 先滤、`limit` 限条数、`maxChars` 截长串,先看 `available_kinds` |
58
63
  | 一路的状态细节 | `get_codex_worker_status`,`current_action` 是它正在跑的命令 |
64
+ | 验收过没过 | 每个读都带 `acceptance`;命令和每条的输出在 `get_worker_result.acceptance.checks` |
59
65
 
60
66
  默认读回来的长文本都是裁过的(`current_action` 300 字、`prompt` 300 字、`last_message` 400 字),别把裁剪当成活没干。全量在库里。别一次 `limit: 200` 拉全量事件。
61
67
 
@@ -65,6 +71,7 @@ description: 把 Codex CLI 当并行 worker 派活、盯进度、收结果。用
65
71
  |---|---|
66
72
  | 主线程自己挂了 | 先 `get_session_works({ session_id })`,一次拿回那批活 |
67
73
  | worker 变 `lost`(MCP 进程没了把它带走了,或被信号杀了) | `resume_codex_worker`。worktree 里的改动和 `thread_id` 都在,同一线程接着干;被杀时正在做的那一步可能要重做 |
74
+ | worktree 落后主线(`base_behind.behind > 0`) | `resume_codex_worker` 带 `rebaseOnto: "HEAD"`,见收活第 4 步 |
68
75
  | worker `failed` | 看 `error` 和日志,查完再 resume 或重派 |
69
76
  | 没记到 `thread_id` 的老行 | `create_codex_followup_worker`,新线程靠文本重述 |
70
77
 
@@ -77,7 +84,7 @@ overview、派单回执、`wait` 返回里出现 `update` 且 `update_available:
77
84
  ## 常见坑
78
85
 
79
86
  - worktree 从一个提交切,你工作区里没 commit 的东西 worker 看不到。要让它读到就给绝对路径或先 commit。
80
- - 它只管"跑完了"不管"对不对",`exit_code: 0` 只说明没崩,验收自己做。
87
+ - `exit_code: 0` 只说明没崩。`acceptance` 是 supervisor 替你跑的验收,`verification` 是它自己跑过的,两个都没有就只剩 diff。验收命令别往 worktree 写文件,会混进它的改动。
81
88
  - `ownedPaths` 是派单前的冲突检测,不是运行时沙箱,拦不住 worker 新建清单外的文件。收活看 diff。
82
89
  - worktree 只隔离工作区,端口和数据库是共用的。
83
90
  - `resume_codex_worker` 不会再建 goal。`cancel_codex_worker` 跨进程靠 pid,要求那个 pid 的命令行里带 `codex`。