Skip to content
Agentmart
Submit a tool

codex-subagents-simple

用 Codex SDK 启动多个并行 subagents。由 primary agent 预先分配 owned paths、阅读文件和验收标准,让 subagents 以 gpt-5.4 + high + danger-full-access 执行并回传改动、检查和风险。

Skill by ShouxinZhang

IndexedMIT
Write a review

Chalk Labs

Need help deploying codex-subagents-simple?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/shouxinzhang-codex-subagents-simple

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

用 Codex SDK 启动多个并行 subagents。由 primary agent 预先分配 owned paths、阅读文件和验收标准,让 subagents 以 gpt-5.4 + high + danger-full-access 执行并回传改动、检查和风险。

Use cases: agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Node.js package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/codex-subagents-simple

What's inside

Skill name
codex-subagents-simple
Description
用 Codex SDK 启动多个并行 subagents。由 primary agent 预先分配 owned paths、阅读文件和验收标准,让 subagents 以 gpt-5.4 + high + danger-full-access 执行并回传改动、检查和风险。
License
MIT
Instructions
149 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (8)

  • .gitignore
  • SKILL.md
  • openai.yaml · agents/
  • package-lock.json
  • package.json
  • run_subagents.ts · scripts/
  • watch_run.ts · scripts/
  • tsconfig.json

SKILL.md (first lines)

# Codex Subagents Simple

这个技能用于把一个较大的任务拆成多个可并行推进的子任务,由 primary agent 明确分配文件边界,再让多个 subagents 直接执行。

## 何时使用

1. 一个任务可以自然拆成多个子任务,并且每个子任务有清晰的 `ownedPaths`。
2. 需要通过并行 subagents 提升推进速度,而不是维持单线程 worker loop。
3. 需要每个 subagent 回传统一结果:`改了什么`、`跑了什么检查`、`还有什么风险`。

## 原则

- primary agent 先拆任务,再运行脚本。
- 每个 subagent 必须拿到明确的:
  - `mission`
  - `ownedPaths`
  - `readFiles`
  - `acceptanceCriteria`
- subagent 使用 `danger-full-access` 执行,但默认只应修改自己负责的 `ownedPaths`。
- 脚本会回收实际文件改动,并标记越界写入风险。

## 前提

- 本地 `node`、`npm` 可用
- 本机 `codex` CLI 可被 `@openai/codex-sdk` 调用,并已可用
- 目标工作区在当前仓库内或一个可访问路径中

## 命令

### 1) 首次安装依赖

```bash
npm --prefix .agents/skills/codex-subagents-simple install
```

### 2) 运行并行 subagents

```bash
npm --prefix .agents/skills/codex-subagents-simple run subagents -- \
  --spec /abs/path/to/subagents-spec.json \
  --workspace-root /abs/path/to/workspace
```

### 3) 控制模型与并发度

```bash
npm --prefix .agents/skills/codex-subagents-simple run subagents -- \
  --spec /abs/path/to/subagents-spec.json \
  --workspace-root /abs/path/to/workspace \
  --model gpt-5.4 \
  --reasoning-effort high \
  --max-parallel 3
```

### 4) 保留 subagent 上下文

默认会把 `subagent name + spec path` 对应的 `threadId` 写到:

```text
.agent_cache/codex-subagents-simple/thread-registry.json
```

下一次运行同一个 spec 时,会自动 `resumeThread(...)`,让每个 subagent 继续自己的线程上下文。

如果你想强制忽略旧线程,使用:

```bash
npm --prefix .agents/skills/codex-subagents-simple run subagents -- \
  --spec /abs/path/to/subagents-spec.json \
  --workspace-root /abs/path/to/workspace \
  --fresh
```

### 5) 实时观察 subagent 工作上下文

运行时会在每个 `runDir` 下写:

- `agents/<name>.status.json`
- `agents/<name>.events.jsonl`
- `run.json`

可以实时观察最近一次 run:

```bash
npm --prefix .agents/skills/codex-subagents-simple run watch
```

也可以指定某个 `runDir`:

```bash
npm --prefix .agents/skills/codex-subagents-simple run watch -- \
  --run-dir /abs/path/to/run-dir
```

## Spec 结构

```json
{
  "task": "修复 reverse/java21-baseline 的一组问题",
  "acceptanceCriteria": [
    "相关模块完成修改",
    "每个 subagent 都返回改动、检查和风险"
  ],
  "sharedContextFiles": [
    "README.md",
    "reverse/java21-baseline/README.md"
  ],
  "subagents": [
    {
      "name": "entry-chain",
      "mission": "修复入口链和启动流程",
      "ownedPaths": [
        "reverse/java21-baseline/src/manual/GameMIDlet.java",
        "reverse/java21-baseline/src/manual/ba.java"
      ],
      "readFiles": [
        "reverse/java21-baseline/src/generated-all/GameMIDlet.java",
        "reverse/java21-baseline/src/generated-all/ba.java"
      ],

From ShouxinZhang/agents-forum, MIT.

More from ShouxinZhang/agents-forum

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Mar 13, 2026 (7 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from ShouxinZhang

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get codex-subagents-simple running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying codex-subagents-simple?

CallGet help
Cite this page

codex-subagents-simple skill. Agent Mart. https://agentmart.dev/skills/shouxinzhang-codex-subagents-simple (last updated 2026-10-24)