oh-my-opencode 4.16.2 → 4.16.3
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/.agents/skills/pre-publish-review/SKILL.md +3 -0
- package/README.md +2 -2
- package/dist/agents/hephaestus/agent.d.ts +1 -1
- package/dist/agents/hephaestus/gpt-5-6.d.ts +2 -0
- package/dist/agents/momus-gpt-5-6.d.ts +1 -0
- package/dist/agents/types.d.ts +2 -0
- package/dist/cli/index.js +800 -536
- package/dist/cli-node/index.js +800 -536
- package/dist/features/background-agent/error-classifier.d.ts +5 -0
- package/dist/features/builtin-commands/templates/refactor-sections/intro-and-analysis.d.ts +1 -1
- package/dist/features/builtin-commands/templates/remove-ai-slops.d.ts +1 -1
- package/dist/index.js +416 -37
- package/dist/shared/live-server-route.d.ts +1 -1
- package/dist/skills/review-work/SKILL.md +1 -1
- package/dist/skills/ulw-plan/references/full-workflow.md +1 -1
- package/dist/skills/ulw-research/SKILL.md +2 -2
- package/dist/skills/visual-qa/SKILL.md +1 -1
- package/dist/tui.js +125 -13
- package/package.json +13 -13
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +398 -246
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.6.md +93 -0
- package/packages/omo-codex/plugin/components/rules/dist/cli.js +43 -24
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/src/codex-hook.ts +2 -1
- package/packages/omo-codex/plugin/components/rules/src/dynamic-target-fingerprints.ts +15 -6
- package/packages/omo-codex/plugin/components/rules/src/rules-engine-factory.ts +7 -2
- package/packages/omo-codex/plugin/components/rules/src/static-injection.ts +2 -2
- package/packages/omo-codex/plugin/components/rules/test/codex-hook.test.ts +32 -0
- package/packages/omo-codex/plugin/components/rules/test/hephaestus-model-variant.test.ts +106 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/AGENTS.md +12 -9
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/SKILL.md +136 -76
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-guide.mjs +94 -23
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-state.mjs +94 -14
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-transport.mjs +55 -0
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team.mjs +72 -18
- package/packages/omo-codex/plugin/components/teammode/test/thread-title-hook.test.ts +23 -0
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/explorer.toml +24 -41
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-clone-fidelity-reviewer.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-code-reviewer.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-executor.toml +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-gate-reviewer.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-qa-executor.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/librarian.toml +21 -49
- package/packages/omo-codex/plugin/components/ultrawork/agents/metis.toml +17 -29
- package/packages/omo-codex/plugin/components/ultrawork/agents/momus.toml +20 -50
- package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +18 -39
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/package-lock.json +13 -13
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/auto-update.mjs +9 -2
- package/packages/omo-codex/plugin/scripts/entry-guard.mjs +26 -0
- package/packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs +3 -1
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/multi-agent-v2-guard.mjs +39 -4
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/subagent-limit-guard.mjs +24 -4
- package/packages/omo-codex/plugin/scripts/migrate-codex-config.mjs +3 -3
- package/packages/omo-codex/plugin/scripts/migrate-omo-sot.mjs +2 -2
- package/packages/omo-codex/plugin/scripts/sync-hook-status-messages.mjs +2 -2
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +6 -4
- package/packages/omo-codex/plugin/scripts/sync-version.mjs +4 -2
- package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/refactor/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/review-work/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/start-work/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/teammode/SKILL.md +136 -76
- package/packages/omo-codex/plugin/skills/teammode/scripts/team-guide.mjs +94 -23
- package/packages/omo-codex/plugin/skills/teammode/scripts/team-state.mjs +94 -14
- package/packages/omo-codex/plugin/skills/teammode/scripts/team-transport.mjs +55 -0
- package/packages/omo-codex/plugin/skills/teammode/scripts/team.mjs +72 -18
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +1 -1
- package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +1 -1
- package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +2 -2
- package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +47 -1
- package/packages/omo-codex/plugin/test/aggregate-skills.test.mjs +4 -2
- package/packages/omo-codex/plugin/test/auto-update-restart-notice.test.mjs +33 -0
- package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +146 -9
- package/packages/omo-codex/plugin/test/multi-agent-v2-regression.test.mjs +71 -0
- package/packages/omo-codex/plugin/test/subagent-limit-migration.test.mjs +32 -0
- package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +9 -2
- package/packages/omo-codex/plugin/test/teammode-transport.test.mjs +345 -0
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +436 -284
- package/packages/omo-codex/scripts/install-generated-bundle.test.mjs +111 -1
- package/packages/shared-skills/skills/review-work/SKILL.md +1 -1
- package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +1 -1
- package/packages/shared-skills/skills/ulw-research/SKILL.md +2 -2
- package/packages/shared-skills/skills/visual-qa/SKILL.md +1 -1
- /package/packages/omo-codex/plugin/components/rules/bundled-rules/{hephaestus.md → hephaestus/gpt-5.5.md} +0 -0
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
4
4
|
import { dirname } from "node:path";
|
|
5
|
-
import { pathToFileURL } from "node:url";
|
|
6
5
|
|
|
6
|
+
import { isCliEntry } from "./entry-guard.mjs";
|
|
7
7
|
import { FALLBACK_CATALOG, readModelCatalog } from "./migrate-codex-config/catalog.mjs";
|
|
8
8
|
import { configPaths } from "./migrate-codex-config/config-paths.mjs";
|
|
9
9
|
import { removeStaleContext7PlaceholderMcpServer } from "./migrate-codex-config/context7-placeholder-guard.mjs";
|
|
@@ -76,7 +76,7 @@ export async function migrateConfigFile(
|
|
|
76
76
|
reasoningApplied = config !== before;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
const multiAgentOptions = { env, sessionModel, requireSessionModel };
|
|
79
|
+
const multiAgentOptions = { env, sessionModel, requireSessionModel, configPath };
|
|
80
80
|
const multiAgentVersion = resolveMultiAgentVersionFromConfig(config, multiAgentOptions);
|
|
81
81
|
const afterMultiAgentGuard = forceDisableMultiAgentV2(config, {
|
|
82
82
|
...multiAgentOptions,
|
|
@@ -145,7 +145,7 @@ async function readConfig(configPath) {
|
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
if (
|
|
148
|
+
if (isCliEntry(import.meta.url)) {
|
|
149
149
|
migrateCodexConfig().catch((error) => {
|
|
150
150
|
if (!(error instanceof Error)) throw error;
|
|
151
151
|
process.exit(0);
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { access, mkdir, readFile, writeFile } from "node:fs/promises";
|
|
4
4
|
import { homedir } from "node:os";
|
|
5
5
|
import { dirname, join } from "node:path";
|
|
6
|
-
import { pathToFileURL } from "node:url";
|
|
7
6
|
|
|
7
|
+
import { isCliEntry } from "./entry-guard.mjs";
|
|
8
8
|
import { addCodexCodegraphValues, hasOwn, isRecord, recordAt } from "./migrate-omo-sot/editor.mjs";
|
|
9
9
|
import { parseJsonc } from "./migrate-omo-sot/jsonc.mjs";
|
|
10
10
|
import { SCAFFOLD } from "./migrate-omo-sot/scaffold.mjs";
|
|
@@ -109,7 +109,7 @@ function isValidCodegraphValue(key, value) {
|
|
|
109
109
|
return typeof value === "boolean";
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
if (
|
|
112
|
+
if (isCliEntry(import.meta.url)) {
|
|
113
113
|
migrateOmoSotConfig({ seed: process.argv.includes("--seed") })
|
|
114
114
|
.then((result) => {
|
|
115
115
|
for (const warning of result.warnings) process.stderr.write(`${warning}\n`);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { access, readdir, readFile, writeFile } from "node:fs/promises";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
|
-
import { pathToFileURL } from "node:url";
|
|
5
4
|
import { fileURLToPath } from "node:url";
|
|
6
5
|
|
|
6
|
+
import { isCliEntry } from "./entry-guard.mjs";
|
|
7
7
|
import { formatLazyCodexHookStatusMessage, normalizeLazyCodexHookStatusLabel } from "./hook-status-message.mjs";
|
|
8
8
|
|
|
9
9
|
const defaultRoot = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
@@ -102,6 +102,6 @@ export async function syncHookStatusMessages(root = defaultRoot, options = {}) {
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
if (
|
|
105
|
+
if (isCliEntry(import.meta.url)) {
|
|
106
106
|
await syncHookStatusMessages();
|
|
107
107
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { cp, mkdir, readdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
|
-
import { fileURLToPath
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
|
|
6
|
+
import { isCliEntry } from "./entry-guard.mjs";
|
|
5
7
|
import { sharedSkillsRootPath } from "@oh-my-opencode/shared-skills";
|
|
6
8
|
|
|
7
9
|
const root = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
@@ -36,7 +38,7 @@ function shouldCopySkillSource(source) {
|
|
|
36
38
|
|
|
37
39
|
const opencodeOnlyOrchestrationPattern = /\b(?:call_omo_agent|background_output|team_[a-z_]+|task)\s*\(/;
|
|
38
40
|
|
|
39
|
-
const codexHarnessToolCompatibility = `## Codex Harness Tool Compatibility
|
|
41
|
+
export const codexHarnessToolCompatibility = `## Codex Harness Tool Compatibility
|
|
40
42
|
|
|
41
43
|
This skill may include examples copied from the OpenCode harness. In Codex, do not call OpenCode-only tools such as \`call_omo_agent(...)\`, \`task(...)\`, \`background_output(...)\`, or \`team_*(...)\` literally. Translate those examples to Codex native tools:
|
|
42
44
|
|
|
@@ -48,7 +50,7 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
|
|
|
48
50
|
| \`task(subagent_type="oracle", ...)\` for final verification | \`multi_agent_v1.spawn_agent({"message":"TASK: act as a rigorous reviewer. ...","agent_type":"lazycodex-gate-reviewer","fork_context":false})\` |
|
|
49
51
|
| \`task(category="...", ...)\` for implementation or QA | \`multi_agent_v1.spawn_agent({"message":"TASK: act as an implementation or QA worker. ...","fork_context":false})\` |
|
|
50
52
|
| \`background_output(task_id="...")\` | \`multi_agent_v1.wait_agent(...)\` for mailbox signals |
|
|
51
|
-
| \`team_*(...)\` | Use Codex native subagents via \`multi_agent_v1.spawn_agent
|
|
53
|
+
| \`team_*(...)\` | Use Codex native subagents via \`multi_agent_v1.spawn_agent\` and \`multi_agent_v1.wait_agent\`; use \`multi_agent_v1.send_input\` and \`multi_agent_v1.close_agent\` only when exposed in the active tools list |
|
|
52
54
|
|
|
53
55
|
Role-specific behavior must be described in a self-contained \`message\`. Use \`fork_context: false\` to start the child with only the initial prompt (no parent history); use \`fork_context: true\` only when full parent history is truly required. Include any required conversation context, files, diffs, constraints, and requested skill names directly in the spawned agent's \`message\`. OMO installs these selectable agent roles into \`~/.codex/agents/\`: \`explorer\`, \`librarian\`, \`plan\`, \`momus\`, \`metis\`, \`lazycodex-code-reviewer\`, \`lazycodex-qa-executor\`, and \`lazycodex-gate-reviewer\` - pass the matching name as \`agent_type\` so the child gets that role's model and instructions. If the spawn tool exposes no \`agent_type\` parameter, omit it and describe the role inside \`message\`. If a code block below conflicts with this section, this section wins.
|
|
54
56
|
|
|
@@ -263,6 +265,6 @@ async function syncSkills() {
|
|
|
263
265
|
}
|
|
264
266
|
}
|
|
265
267
|
|
|
266
|
-
if (
|
|
268
|
+
if (isCliEntry(import.meta.url)) {
|
|
267
269
|
await syncSkills();
|
|
268
270
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { readdir, readFile, writeFile } from "node:fs/promises";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
|
-
import { fileURLToPath
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
|
|
6
|
+
import { isCliEntry } from "./entry-guard.mjs";
|
|
5
7
|
|
|
6
8
|
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
|
7
9
|
const defaultPluginRoot = dirname(scriptDir);
|
|
@@ -88,7 +90,7 @@ export async function syncVersion(options = {}) {
|
|
|
88
90
|
return { version, targets, changed };
|
|
89
91
|
}
|
|
90
92
|
|
|
91
|
-
if (
|
|
93
|
+
if (isCliEntry(import.meta.url)) {
|
|
92
94
|
const result = await syncVersion();
|
|
93
95
|
console.log(`Synced OMO Codex manifests to version ${result.version} (${result.changed.length} updated)`);
|
|
94
96
|
}
|
|
@@ -14,7 +14,7 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
|
|
|
14
14
|
| `task(subagent_type="oracle", ...)` for final verification | `multi_agent_v1.spawn_agent({"message":"TASK: act as a rigorous reviewer. ...","agent_type":"lazycodex-gate-reviewer","fork_context":false})` |
|
|
15
15
|
| `task(category="...", ...)` for implementation or QA | `multi_agent_v1.spawn_agent({"message":"TASK: act as an implementation or QA worker. ...","fork_context":false})` |
|
|
16
16
|
| `background_output(task_id="...")` | `multi_agent_v1.wait_agent(...)` for mailbox signals |
|
|
17
|
-
| `team_*(...)` | Use Codex native subagents via `multi_agent_v1.spawn_agent
|
|
17
|
+
| `team_*(...)` | Use Codex native subagents via `multi_agent_v1.spawn_agent` and `multi_agent_v1.wait_agent`; use `multi_agent_v1.send_input` and `multi_agent_v1.close_agent` only when exposed in the active tools list |
|
|
18
18
|
|
|
19
19
|
Role-specific behavior must be described in a self-contained `message`. Use `fork_context: false` to start the child with only the initial prompt (no parent history); use `fork_context: true` only when full parent history is truly required. Include any required conversation context, files, diffs, constraints, and requested skill names directly in the spawned agent's `message`. OMO installs these selectable agent roles into `~/.codex/agents/`: `explorer`, `librarian`, `plan`, `momus`, `metis`, `lazycodex-code-reviewer`, `lazycodex-qa-executor`, and `lazycodex-gate-reviewer` - pass the matching name as `agent_type` so the child gets that role's model and instructions. If the spawn tool exposes no `agent_type` parameter, omit it and describe the role inside `message`. If a code block below conflicts with this section, this section wins.
|
|
20
20
|
|
|
@@ -15,7 +15,7 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
|
|
|
15
15
|
| `task(subagent_type="oracle", ...)` for final verification | `multi_agent_v1.spawn_agent({"message":"TASK: act as a rigorous reviewer. ...","agent_type":"lazycodex-gate-reviewer","fork_context":false})` |
|
|
16
16
|
| `task(category="...", ...)` for implementation or QA | `multi_agent_v1.spawn_agent({"message":"TASK: act as an implementation or QA worker. ...","fork_context":false})` |
|
|
17
17
|
| `background_output(task_id="...")` | `multi_agent_v1.wait_agent(...)` for mailbox signals |
|
|
18
|
-
| `team_*(...)` | Use Codex native subagents via `multi_agent_v1.spawn_agent
|
|
18
|
+
| `team_*(...)` | Use Codex native subagents via `multi_agent_v1.spawn_agent` and `multi_agent_v1.wait_agent`; use `multi_agent_v1.send_input` and `multi_agent_v1.close_agent` only when exposed in the active tools list |
|
|
19
19
|
|
|
20
20
|
Role-specific behavior must be described in a self-contained `message`. Use `fork_context: false` to start the child with only the initial prompt (no parent history); use `fork_context: true` only when full parent history is truly required. Include any required conversation context, files, diffs, constraints, and requested skill names directly in the spawned agent's `message`. OMO installs these selectable agent roles into `~/.codex/agents/`: `explorer`, `librarian`, `plan`, `momus`, `metis`, `lazycodex-code-reviewer`, `lazycodex-qa-executor`, and `lazycodex-gate-reviewer` - pass the matching name as `agent_type` so the child gets that role's model and instructions. If the spawn tool exposes no `agent_type` parameter, omit it and describe the role inside `message`. If a code block below conflicts with this section, this section wins.
|
|
21
21
|
|
|
@@ -15,7 +15,7 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
|
|
|
15
15
|
| `task(subagent_type="oracle", ...)` for final verification | `multi_agent_v1.spawn_agent({"message":"TASK: act as a rigorous reviewer. ...","agent_type":"lazycodex-gate-reviewer","fork_context":false})` |
|
|
16
16
|
| `task(category="...", ...)` for implementation or QA | `multi_agent_v1.spawn_agent({"message":"TASK: act as an implementation or QA worker. ...","fork_context":false})` |
|
|
17
17
|
| `background_output(task_id="...")` | `multi_agent_v1.wait_agent(...)` for mailbox signals |
|
|
18
|
-
| `team_*(...)` | Use Codex native subagents via `multi_agent_v1.spawn_agent
|
|
18
|
+
| `team_*(...)` | Use Codex native subagents via `multi_agent_v1.spawn_agent` and `multi_agent_v1.wait_agent`; use `multi_agent_v1.send_input` and `multi_agent_v1.close_agent` only when exposed in the active tools list |
|
|
19
19
|
|
|
20
20
|
Role-specific behavior must be described in a self-contained `message`. Use `fork_context: false` to start the child with only the initial prompt (no parent history); use `fork_context: true` only when full parent history is truly required. Include any required conversation context, files, diffs, constraints, and requested skill names directly in the spawned agent's `message`. OMO installs these selectable agent roles into `~/.codex/agents/`: `explorer`, `librarian`, `plan`, `momus`, `metis`, `lazycodex-code-reviewer`, `lazycodex-qa-executor`, and `lazycodex-gate-reviewer` - pass the matching name as `agent_type` so the child gets that role's model and instructions. If the spawn tool exposes no `agent_type` parameter, omit it and describe the role inside `message`. If a code block below conflicts with this section, this section wins.
|
|
21
21
|
|
|
@@ -14,7 +14,7 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
|
|
|
14
14
|
| `task(subagent_type="oracle", ...)` for final verification | `multi_agent_v1.spawn_agent({"message":"TASK: act as a rigorous reviewer. ...","agent_type":"lazycodex-gate-reviewer","fork_context":false})` |
|
|
15
15
|
| `task(category="...", ...)` for implementation or QA | `multi_agent_v1.spawn_agent({"message":"TASK: act as an implementation or QA worker. ...","fork_context":false})` |
|
|
16
16
|
| `background_output(task_id="...")` | `multi_agent_v1.wait_agent(...)` for mailbox signals |
|
|
17
|
-
| `team_*(...)` | Use Codex native subagents via `multi_agent_v1.spawn_agent
|
|
17
|
+
| `team_*(...)` | Use Codex native subagents via `multi_agent_v1.spawn_agent` and `multi_agent_v1.wait_agent`; use `multi_agent_v1.send_input` and `multi_agent_v1.close_agent` only when exposed in the active tools list |
|
|
18
18
|
|
|
19
19
|
Role-specific behavior must be described in a self-contained `message`. Use `fork_context: false` to start the child with only the initial prompt (no parent history); use `fork_context: true` only when full parent history is truly required. Include any required conversation context, files, diffs, constraints, and requested skill names directly in the spawned agent's `message`. OMO installs these selectable agent roles into `~/.codex/agents/`: `explorer`, `librarian`, `plan`, `momus`, `metis`, `lazycodex-code-reviewer`, `lazycodex-qa-executor`, and `lazycodex-gate-reviewer` - pass the matching name as `agent_type` so the child gets that role's model and instructions. If the spawn tool exposes no `agent_type` parameter, omit it and describe the role inside `message`. If a code block below conflicts with this section, this section wins.
|
|
20
20
|
|
|
@@ -15,7 +15,7 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
|
|
|
15
15
|
| `task(subagent_type="oracle", ...)` for final verification | `multi_agent_v1.spawn_agent({"message":"TASK: act as a rigorous reviewer. ...","agent_type":"lazycodex-gate-reviewer","fork_context":false})` |
|
|
16
16
|
| `task(category="...", ...)` for implementation or QA | `multi_agent_v1.spawn_agent({"message":"TASK: act as an implementation or QA worker. ...","fork_context":false})` |
|
|
17
17
|
| `background_output(task_id="...")` | `multi_agent_v1.wait_agent(...)` for mailbox signals |
|
|
18
|
-
| `team_*(...)` | Use Codex native subagents via `multi_agent_v1.spawn_agent
|
|
18
|
+
| `team_*(...)` | Use Codex native subagents via `multi_agent_v1.spawn_agent` and `multi_agent_v1.wait_agent`; use `multi_agent_v1.send_input` and `multi_agent_v1.close_agent` only when exposed in the active tools list |
|
|
19
19
|
|
|
20
20
|
Role-specific behavior must be described in a self-contained `message`. Use `fork_context: false` to start the child with only the initial prompt (no parent history); use `fork_context: true` only when full parent history is truly required. Include any required conversation context, files, diffs, constraints, and requested skill names directly in the spawned agent's `message`. OMO installs these selectable agent roles into `~/.codex/agents/`: `explorer`, `librarian`, `plan`, `momus`, `metis`, `lazycodex-code-reviewer`, `lazycodex-qa-executor`, and `lazycodex-gate-reviewer` - pass the matching name as `agent_type` so the child gets that role's model and instructions. If the spawn tool exposes no `agent_type` parameter, omit it and describe the role inside `message`. If a code block below conflicts with this section, this section wins.
|
|
21
21
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: teammode
|
|
3
|
-
description: "Codex-only team orchestration: run a named team of cooperating Codex
|
|
3
|
+
description: "Codex-only team orchestration: run a named team of cooperating Codex workers with durable, script-managed state. MUST USE when the user asks Codex to create, run, coordinate, inspect, archive, or delete a team of agents/threads/sessions, or to work on something as a team in parallel. FIRST inspects the active tool surface and tells the user which transport it selected: native MultiAgentV2 agents (flat spawn_agent with task_name) when available, Codex App threads as the fallback. The main session is always the leader; members are defined by a concrete part, ownership area, or perspective - never a vague job role; a bundled cross-platform script writes the .omo/teams state plus an auto-generated member field manual. Use a team when the work is not perfectly isolated but parallelizing helps; use plain subagents when scope is perfectly isolated or the goal is ambiguous. Triggers: team mode, teammode, make a team, run as a team, team of agents, coordinate threads, parallel Codex threads, archive the team."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Teammode
|
|
7
7
|
|
|
8
|
-
Run a named team of cooperating Codex
|
|
9
|
-
This is a Codex-only workflow. It
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
Run a named team of cooperating Codex workers under one leader, with durable state on disk.
|
|
9
|
+
This is a Codex-only workflow. It never depends on an external terminal runner - it
|
|
10
|
+
coordinates through Codex's own collaboration tools plus a bundled state script, on ONE of
|
|
11
|
+
two transports chosen up front: native MultiAgentV2 agents, or Codex App threads as the
|
|
12
|
+
fallback.
|
|
13
13
|
|
|
14
14
|
## When to use a team (and when to use plain subagents instead)
|
|
15
15
|
|
|
@@ -19,17 +19,43 @@ Use a TEAM when EITHER holds:
|
|
|
19
19
|
- one task still needs exploration, yet its GOAL is already clear - parallel investigation under
|
|
20
20
|
a fixed objective.
|
|
21
21
|
|
|
22
|
-
Use plain subagents (`$ulw` /
|
|
22
|
+
Use plain fire-and-forget subagents (`$ulw` / one-off `spawn_agent` workers) - NOT a team - when
|
|
23
|
+
EITHER holds:
|
|
23
24
|
- the work IS perfectly isolated, so there is no coordination cost worth paying; or
|
|
24
25
|
- the GOAL is still ambiguous, where one mind should resolve direction before any fan-out.
|
|
25
26
|
|
|
26
27
|
A team buys cross-member coordination at a real overhead cost; only spend it when coordination
|
|
27
28
|
is the thing you actually need.
|
|
28
29
|
|
|
30
|
+
## Pick the transport FIRST - then tell the user
|
|
31
|
+
|
|
32
|
+
Before creating any team state, decide which transport this session can run.
|
|
33
|
+
Inspect your active tool list and select:
|
|
34
|
+
|
|
35
|
+
1. **MultiAgentV2 (preferred)** - select when the flat V2 collaboration tools are ALL active:
|
|
36
|
+
flat `spawn_agent` whose schema requires `task_name`, plus `send_message`, `followup_task`,
|
|
37
|
+
`wait_agent`, `list_agents`, and `interrupt_agent`. Members are durable native agents
|
|
38
|
+
addressed by task name / agent path (`/root/<task_name>`). The namespaced
|
|
39
|
+
`multi_agent_v1.*` surface never qualifies as a team transport.
|
|
40
|
+
2. **Codex App threads (fallback)** - select when flat V2 is not available but the
|
|
41
|
+
`codex_app.*` thread tools are (`create_thread`, `read_thread`, `send_message_to_thread`,
|
|
42
|
+
`set_thread_title`, `set_thread_archived`).
|
|
43
|
+
3. **Neither complete set available** - STOP before `init`. Tell the user which tools are
|
|
44
|
+
missing; do not fake a team with partial tooling.
|
|
45
|
+
|
|
46
|
+
Then, BEFORE running `init`, tell the user in one line which transport you selected and why,
|
|
47
|
+
e.g. `Teammode transport: MultiAgentV2 (flat spawn_agent with task_name).` or
|
|
48
|
+
`Teammode transport: Codex App threads (flat V2 tools not present in this session).`
|
|
49
|
+
|
|
50
|
+
Pass that choice to `init` as `--transport multi_agent_v2` or `--transport codex_app`. The
|
|
51
|
+
transport is recorded in `team.json` and is IMMUTABLE for the team's lifetime: a V2 spawn
|
|
52
|
+
failure is a V2 blocker to report, never permission to mix Codex App threads into the same
|
|
53
|
+
team. Never probe by trial-calling tools; read your tool list.
|
|
54
|
+
|
|
29
55
|
## You are the leader - orchestrate, do not implement
|
|
30
56
|
|
|
31
57
|
The main session is ALWAYS the team leader; you orchestrate directly and never spin up a separate
|
|
32
|
-
leader
|
|
58
|
+
leader worker. Your job is orchestration, NOT writing product code: split the work and assign each
|
|
33
59
|
slice, hold live situational awareness of every member, verify and QA what they deliver, relay
|
|
34
60
|
findings between members, instruct and unblock, and synthesize the result. DELEGATE every code edit
|
|
35
61
|
to a member - if you catch yourself editing product files while the team runs, that work was a
|
|
@@ -39,7 +65,7 @@ merge), not the keystrokes.
|
|
|
39
65
|
## Compose by part, ownership, or perspective - not by job title
|
|
40
66
|
|
|
41
67
|
A team is ALWAYS two or more members - never a single-member team. One worker on an isolated
|
|
42
|
-
job is a
|
|
68
|
+
job is a plain subagent, not a team; if you end up with a single member,
|
|
43
69
|
either split off a second distinct slice or drop the team and use a subagent.
|
|
44
70
|
|
|
45
71
|
Compose the team from what you actually KNOW about the work. Ground the split in real knowledge
|
|
@@ -50,8 +76,10 @@ perspective/lens. Assigning a vague role ("backend dev", "release analyst", "the
|
|
|
50
76
|
anti-pattern - it gives the member no real boundary and invites overlap. Each member's `focus`
|
|
51
77
|
names what they own concretely; the `lens` is one of `area`, `ownership`, or `perspective`.
|
|
52
78
|
Give each member a short, distinct `--name` too - its role or what it watches (e.g.
|
|
53
|
-
`app-server-lifecycle`, `mailbox-delivery`) -
|
|
54
|
-
one name for two members.
|
|
79
|
+
`app-server-lifecycle`, `mailbox-delivery`) - it labels the member everywhere; never reuse
|
|
80
|
+
one name for two members. On MultiAgentV2 teams also give each member a unique
|
|
81
|
+
`--task-name` in `lowercase_digits_underscores` form - it becomes the member's permanent
|
|
82
|
+
agent path `/root/<task_name>`.
|
|
55
83
|
|
|
56
84
|
## Run the script - never hand-write team state
|
|
57
85
|
|
|
@@ -60,9 +88,10 @@ the member manual by hand. Run it with `node` (or `bun`); it works on macOS, Lin
|
|
|
60
88
|
Replace `<skill-root>` with this skill's own directory.
|
|
61
89
|
|
|
62
90
|
```
|
|
63
|
-
node "<skill-root>/scripts/team.mjs" init --name "<team>" --session-name "<session>" [--session <
|
|
64
|
-
node "<skill-root>/scripts/team.mjs" add-member --team <session_id> --id A --name "<short role>" --focus "<part/ownership/perspective>" --lens area|ownership|perspective --deliverable "<...>" [--branch <branch>]
|
|
65
|
-
node "<skill-root>/scripts/team.mjs" bind-
|
|
91
|
+
node "<skill-root>/scripts/team.mjs" init --name "<team>" --session-name "<session>" --transport multi_agent_v2|codex_app [--session <leader_thread_id>] [--worktree] [--base-branch dev]
|
|
92
|
+
node "<skill-root>/scripts/team.mjs" add-member --team <session_id> --id A --name "<short role>" [--task-name <v2_task_name>] --focus "<part/ownership/perspective>" --lens area|ownership|perspective --deliverable "<...>" [--branch <branch>]
|
|
93
|
+
node "<skill-root>/scripts/team.mjs" bind-agent --team <session_id> --id A --agent-path /root/<task_name> [--cwd <path>] # multi_agent_v2 teams
|
|
94
|
+
node "<skill-root>/scripts/team.mjs" bind-thread --team <session_id> --id A --thread <thread_id> [--cwd <path>] # codex_app teams
|
|
66
95
|
node "<skill-root>/scripts/team.mjs" member-prompt --team <session_id> --id A
|
|
67
96
|
node "<skill-root>/scripts/team.mjs" set-status --team <session_id> --id A --status reported|blocked|active|archived [--note "<...>"]
|
|
68
97
|
node "<skill-root>/scripts/team.mjs" worktree-add --team <session_id> --id A [--base-branch <branch>]
|
|
@@ -74,70 +103,93 @@ node "<skill-root>/scripts/team.mjs" status --team <session_id>
|
|
|
74
103
|
```
|
|
75
104
|
|
|
76
105
|
`init` creates `.omo/teams/{session_id}/` containing `team.json` (the single durable state file:
|
|
77
|
-
team id, the main-session leader, the member roster, status, worktree config, and a
|
|
78
|
-
log), `guide.md` (the auto-generated member field manual), and `artifacts/` (a shared
|
|
79
|
-
space). `{session_id}` is the leader's Codex session id when you can
|
|
80
|
-
otherwise the script generates a stable handle. Re-running `init` is a
|
|
81
|
-
subcommand rewrites `guide.md`, so the manual always matches the
|
|
106
|
+
team id, transport, the main-session leader, the member roster, status, worktree config, and a
|
|
107
|
+
lifecycle log), `guide.md` (the auto-generated member field manual), and `artifacts/` (a shared
|
|
108
|
+
exchange space). On codex_app teams `{session_id}` is the leader's Codex session id when you can
|
|
109
|
+
pass it via `--session`; otherwise the script generates a stable handle. Re-running `init` is a
|
|
110
|
+
safe no-op. Every mutating subcommand rewrites `guide.md`, so the manual always matches the
|
|
111
|
+
current team.
|
|
82
112
|
|
|
83
113
|
Mutating subcommands take a per-team state lock before reading and rewriting `team.json`. It is
|
|
84
|
-
safe to run independent `add-member`, `bind-thread`, `set-status`, `archive`,
|
|
85
|
-
and worktree mutation commands concurrently against the same team: they
|
|
86
|
-
reads the latest committed state before writing. If a command reports
|
|
87
|
-
do not treat the intended mutation as complete; retry after the named
|
|
88
|
-
`.omo/teams/{session_id}/.team.lock/owner.json` if the previous
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
`
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
3. `bind-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
4.
|
|
108
|
-
`codex
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
114
|
+
safe to run independent `add-member`, `bind-agent`, `bind-thread`, `set-status`, `archive`,
|
|
115
|
+
`delete`, `guide`, and worktree mutation commands concurrently against the same team: they
|
|
116
|
+
serialize and each command reads the latest committed state before writing. If a command reports
|
|
117
|
+
that team state is locked, do not treat the intended mutation as complete; retry after the named
|
|
118
|
+
command finishes, or inspect `.omo/teams/{session_id}/.team.lock/owner.json` if the previous
|
|
119
|
+
command crashed. `bind-agent` refuses codex_app teams and `bind-thread` refuses multi_agent_v2
|
|
120
|
+
teams, and a refused command never changes `team.json`.
|
|
121
|
+
|
|
122
|
+
## Create the team and its members
|
|
123
|
+
|
|
124
|
+
`init` the team, then `add-member` once per member. What happens next depends on the transport.
|
|
125
|
+
|
|
126
|
+
**MultiAgentV2 teams:**
|
|
127
|
+
1. If a member needs an isolated worktree, run `worktree-add` BEFORE spawning it - flat
|
|
128
|
+
`spawn_agent` has no cwd argument, so the path must ride in the bootstrap message.
|
|
129
|
+
2. Spawn each member with flat `spawn_agent`: `task_name` is that member's `--task-name`,
|
|
130
|
+
`message` is the bootstrap printed by `add-member` / `member-prompt`, and
|
|
131
|
+
`fork_turns: "none"` (members read `guide.md` for context; full parent history is not
|
|
132
|
+
their context model). Do not set `agent_type`, `model`, or `reasoning_effort`.
|
|
133
|
+
3. `bind-agent --agent-path` with the canonical task name the spawn returned (normally
|
|
134
|
+
`/root/<task_name>`); binding confirms the runtime identity matches the roster and records
|
|
135
|
+
the member's cwd. Members are durable: they persist as subagent threads, survive idling,
|
|
136
|
+
and are re-tasked with `followup_task` - never respawned under a second name.
|
|
137
|
+
4. Members appear in `list_agents` with their task paths; inspect status there instead of
|
|
138
|
+
deep links (V2 exposes no thread title or `codex://` link surface to you).
|
|
139
|
+
|
|
140
|
+
**Codex App teams:**
|
|
141
|
+
1. Create a durable thread per member with `codex_app.create_thread` - ALWAYS this tool for
|
|
142
|
+
every member - titled `[team name] <member name>`, using THAT member's own name, so no two
|
|
143
|
+
threads share a title. `add-member` prints the exact title to use. If the tool accepts a
|
|
144
|
+
working directory / cwd argument, set it to that member's worktree; otherwise the member's
|
|
145
|
+
manual tells it to `cd` there first. Use `codex_app.set_thread_title` if the title did not
|
|
146
|
+
land at creation. If Codex returns only `pendingWorktreeId`, the worktree-backed thread is
|
|
147
|
+
not ready yet: do not `bind-thread` and do not send the member bootstrap. Wait until Codex
|
|
148
|
+
surfaces a real `threadId`, then set the title, bind that real id with the cwd, and only
|
|
149
|
+
then send the bootstrap.
|
|
150
|
+
2. `bind-thread` to record each thread id (and `--cwd`), then send that member's bootstrap
|
|
151
|
+
trigger as the thread's first message. The trigger is short on purpose: it tells the new
|
|
152
|
+
thread to READ its `guide.md` and `team.json` rather than carrying the whole protocol inline.
|
|
153
|
+
3. Whenever you report, audit, reopen, or hand off a member thread, include the app deep link
|
|
154
|
+
`codex://threads/<thread_id>` next to the raw id - worktree-backed threads are easy to lose
|
|
155
|
+
in the sidebar without it. On a codex_app team, a spawned in-process agent is never a
|
|
156
|
+
member substitute: it cannot carry the team title or be inspected, titled, archived, or
|
|
157
|
+
re-opened with the `codex_app.*` tools this team runs on.
|
|
158
|
+
|
|
159
|
+
On either transport, a member only counts once it is bound (`bind-agent` / `bind-thread`). If
|
|
160
|
+
the selected transport's tools stop working mid-run, STOP and say so (see Stop rules); do not
|
|
161
|
+
quietly switch transports.
|
|
120
162
|
|
|
121
163
|
## Communication
|
|
122
164
|
|
|
123
|
-
Members push to you and to one another
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
165
|
+
Members push to you and to one another; you never poll them as a routine. The address book is
|
|
166
|
+
`team.json`, and the generated manual binds members to the hard rules, so you mainly keep the
|
|
167
|
+
channel open: expect frequent small inbound updates from each member - findings,
|
|
168
|
+
`WORKING:`/`BLOCKED:` markers, peer digests - rather than one final dump, and act on them as
|
|
169
|
+
they arrive.
|
|
170
|
+
|
|
171
|
+
- **MultiAgentV2:** members reach you with `send_message` to `/root` and reach peers by their
|
|
172
|
+
`members[].agentPath`. You reach members the same way; use `followup_task` when you hand an
|
|
173
|
+
idle member NEW work (it wakes the member), `send_message` for context that should not
|
|
174
|
+
interrupt, and `wait_agent` only when you are genuinely blocked on their next update - a
|
|
175
|
+
`wait_agent` timeout only means no new mailbox update arrived, never that a member failed.
|
|
176
|
+
Your own session IS `/root` - members can always reach you; leave `--session` unset.
|
|
177
|
+
- **Codex App:** members push with `codex_app.send_message_to_thread`; you inspect state with
|
|
178
|
+
`codex_app.read_thread`. So members can actually reach you, run `init` with
|
|
179
|
+
`--session <your own thread id>` - that makes `leader.sessionId` in team.json a real,
|
|
180
|
+
messageable thread; without it members cannot report to you and you are stuck polling.
|
|
181
|
+
|
|
182
|
+
All member-to-member and member-to-leader traffic is in English; when the END user addresses a
|
|
183
|
+
member, that member replies in the user's own language. Members hand off files and memos
|
|
184
|
+
through the team `artifacts/` directory and reference them by path.
|
|
132
185
|
|
|
133
186
|
## Let members work - do not rush them
|
|
134
187
|
|
|
135
188
|
Members heartbeat every few tool calls and message you on every finding, blocker, and finished
|
|
136
189
|
slice (their manual binds them to this). So a member that is quiet between heartbeats is **working,
|
|
137
190
|
not stalled** - a stretch of silence is the normal sound of focused work, not a problem to chase.
|
|
138
|
-
Re-reading
|
|
139
|
-
|
|
140
|
-
let them cook.
|
|
191
|
+
Re-reading a calm member's state, or sending "any update?" / "are you done?" / "hurry up" pings,
|
|
192
|
+
interrupts that member and slows the whole team. Trust the heartbeat and let them cook.
|
|
141
193
|
|
|
142
194
|
Message a member only when one of these is true:
|
|
143
195
|
- you have new information, context, or a correction it needs to do its slice right;
|
|
@@ -147,7 +199,9 @@ Message a member only when one of these is true:
|
|
|
147
199
|
then send one specific question, not a barrage.
|
|
148
200
|
|
|
149
201
|
Otherwise stay calm and keep the channel open: read inbound updates as they arrive and act on them.
|
|
150
|
-
A long-running member is alive; a heartbeat you have not received yet is not a failure.
|
|
202
|
+
A long-running member is alive; a heartbeat you have not received yet is not a failure. Fallback only when
|
|
203
|
+
a member is completed without its deliverable, explicitly `BLOCKED:`, or no longer running - then
|
|
204
|
+
unblock, reassign, or re-task that slice instead of waiting on it. Wait for
|
|
151
205
|
every required member's final report before you declare the team done - rushing toward "done" while
|
|
152
206
|
members are still mid-slice just produces half-built work you will have to redo.
|
|
153
207
|
|
|
@@ -162,10 +216,12 @@ its own worktree. To land the work, `integrate --team <id>` merges every member
|
|
|
162
216
|
current branch with a merge commit (never a squash or rebase); resolve any conflict it reports, then
|
|
163
217
|
`worktree-remove` each worktree at cleanup.
|
|
164
218
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
`
|
|
219
|
+
Delivering the path differs by transport: on MultiAgentV2, create the worktree BEFORE spawning
|
|
220
|
+
so the bootstrap carries it, or send it to an already-running member as a `followup_task`; on
|
|
221
|
+
Codex App, send a follow-up message that includes both the worktree path and the member's
|
|
222
|
+
`codex://threads/<thread_id>` link. Either way, run `bind-agent`/`bind-thread` with
|
|
223
|
+
`--cwd <worktree>` (or `--worktree-path`) so `team.json`, `guide.md`, `status`, and
|
|
224
|
+
`member-prompt` all point at the same worktree-backed member.
|
|
169
225
|
|
|
170
226
|
When the member starts inside a worktree, it must verify the assigned cwd exists and contains the
|
|
171
227
|
repository checkout before editing. If the directory is missing, empty, or does not look like a git
|
|
@@ -194,8 +250,11 @@ then delete the team state only after archival evidence is clean or preserved. A
|
|
|
194
250
|
is never disbanded is a leak.
|
|
195
251
|
|
|
196
252
|
- `archive` closes the team: notify each active member, copy anything useful into `artifacts/`,
|
|
197
|
-
then
|
|
198
|
-
|
|
253
|
+
then close each member on its transport. On MultiAgentV2, `interrupt_agent` any member still
|
|
254
|
+
mid-turn and record in the note that V2 exposes no runtime archive operation - the durable
|
|
255
|
+
`team.json` state IS the archive; never claim a V2 agent itself was archived. On Codex App,
|
|
256
|
+
try `codex_app.set_thread_archived` per member thread; treat failures such as
|
|
257
|
+
"Ambiguous Codex thread id" or an id that is ambiguous across hosts as an
|
|
199
258
|
app-thread archival blocker, not as a team-state blocker: record the failure in the team log,
|
|
200
259
|
tell the user which member thread was not proven archived, and continue the team-state archive
|
|
201
260
|
with `archive --note "<blocker>"`. Never pretend a member thread was archived. Do not delete the
|
|
@@ -212,5 +271,6 @@ is never disbanded is a leak.
|
|
|
212
271
|
- Stop and ask before deleting an unarchived team while any member is still active.
|
|
213
272
|
- Member communication stays English unless the user explicitly requests otherwise; user-facing
|
|
214
273
|
replies follow the user's language.
|
|
215
|
-
- Stop if the
|
|
216
|
-
|
|
274
|
+
- Stop if the selected transport's tools (V2 spawn/message/wait/list/interrupt, or Codex App
|
|
275
|
+
create/read/send/title/archive) are unavailable or stop working; say so instead of faking it
|
|
276
|
+
or silently switching transports.
|