The one and only agent harness for complex codebases. Project memory, planning, execution, and verified completion inside Codex.
JavaScript aiai-agentsclaudeclaude-codeclicodexdeveloper-toolslazylazycodexoh-my-openagentomoopenaiorchestrationtypescript
chore: sync Codex marketplace v4.16.2
github-actions[bot]132a61da36e2
diff --git a/plugins/omo/.codex-plugin/plugin.json b/plugins/omo/.codex-plugin/plugin.jsonindex d5e58e96..c617280e 100644--- a/plugins/omo/.codex-plugin/plugin.json+++ b/plugins/omo/.codex-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "omo",- "version": "4.16.1",+ "version": "4.16.2","description": "One Codex plugin namespace for Yeongyu's local Codex components.","author": {"name": "Yeongyu Kim",diff --git a/plugins/omo/components/bootstrap/hooks/hooks.json b/plugins/omo/components/bootstrap/hooks/hooks.jsonindex f75e298d..1ceb568f 100644--- a/plugins/omo/components/bootstrap/hooks/hooks.json+++ b/plugins/omo/components/bootstrap/hooks/hooks.json@@ -8,7 +8,7 @@"command": "node \"${PLUGIN_ROOT}/components/bootstrap/dist/cli.js\" hook session-start","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\bootstrap.ps1\"","timeout": 30,- "statusMessage": "(OmO 4.16.1) Checking Bootstrap Provisioning"+ "statusMessage": "(OmO 4.16.2) Checking Bootstrap Provisioning"}]}diff --git a/plugins/omo/components/bootstrap/package.json b/plugins/omo/components/bootstrap/package.jsonindex f741570d..d4f60cdf 100644--- a/plugins/omo/components/bootstrap/package.json+++ b/plugins/omo/components/bootstrap/package.json@@ -1,6 +1,6 @@{"name": "@sisyphuslabs/codex-bootstrap",- "version": "4.16.1",+ "version": "4.16.2","description": "Codex SessionStart bootstrap component that provisions LazyCodex runtime dependencies from a detached worker.","type": "module","private": true,diff --git a/plugins/omo/components/codegraph/package.json b/plugins/omo/components/codegraph/package.jsonindex 75c883c7..397da9a8 100644--- a/plugins/omo/components/codegraph/package.json+++ b/plugins/omo/components/codegraph/package.json@@ -1,6 +1,6 @@{"name": "@sisyphuslabs/codex-codegraph",- "version": "4.16.1",+ "version": "4.16.2","description": "Codex plugin MCP wrapper for CodeGraph.","type": "module","private": true,diff --git a/plugins/omo/components/comment-checker/hooks/hooks.json b/plugins/omo/components/comment-checker/hooks/hooks.jsonindex a124b4e9..2f43c5a9 100644--- a/plugins/omo/components/comment-checker/hooks/hooks.json+++ b/plugins/omo/components/comment-checker/hooks/hooks.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use","timeout": 30,- "statusMessage": "(OmO 4.16.1) Checking Comments"+ "statusMessage": "(OmO 4.16.2) Checking Comments"}]}diff --git a/plugins/omo/components/comment-checker/package.json b/plugins/omo/components/comment-checker/package.jsonindex 27f5ca11..d79b0fca 100644--- a/plugins/omo/components/comment-checker/package.json+++ b/plugins/omo/components/comment-checker/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-comment-checker",- "version": "4.16.1",+ "version": "4.16.2","description": "Codex plugin that runs comment-checker after edit-like PostToolUse hooks.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/git-bash/hooks/hooks.json b/plugins/omo/components/git-bash/hooks/hooks.jsonindex 42603d5d..885f4357 100644--- a/plugins/omo/components/git-bash/hooks/hooks.json+++ b/plugins/omo/components/git-bash/hooks/hooks.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use","timeout": 5,- "statusMessage": "(OmO 4.16.1) Recommending Git Bash MCP"+ "statusMessage": "(OmO 4.16.2) Recommending Git Bash MCP"}]}@@ -20,7 +20,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact","timeout": 5,- "statusMessage": "(OmO 4.16.1) Resetting Git Bash MCP Reminder"+ "statusMessage": "(OmO 4.16.2) Resetting Git Bash MCP Reminder"}]}diff --git a/plugins/omo/components/git-bash/package.json b/plugins/omo/components/git-bash/package.jsonindex 7e23a22a..02dcd048 100644--- a/plugins/omo/components/git-bash/package.json+++ b/plugins/omo/components/git-bash/package.json@@ -1,6 +1,6 @@{"name": "@sisyphuslabs/codex-git-bash-hook",- "version": "4.16.1",+ "version": "4.16.2","description": "Codex hook component that reminds Windows sessions to prefer the OMO git_bash MCP.","type": "module","private": true,diff --git a/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.json b/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.jsonindex 56857859..b762bba4 100644--- a/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.json+++ b/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/lazycodex-executor-verify/dist/cli.js\" hook subagent-stop","timeout": 10,- "statusMessage": "(OmO 4.16.1) Verifying LazyCodex Executor Evidence"+ "statusMessage": "(OmO 4.16.2) Verifying LazyCodex Executor Evidence"}]}diff --git a/plugins/omo/components/lazycodex-executor-verify/package.json b/plugins/omo/components/lazycodex-executor-verify/package.jsonindex 5467c3b8..5415157e 100644--- a/plugins/omo/components/lazycodex-executor-verify/package.json+++ b/plugins/omo/components/lazycodex-executor-verify/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-lazycodex-executor-verify",- "version": "4.16.1",+ "version": "4.16.2","description": "Codex SubagentStop evidence verifier for LazyCodex executor completions.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/lsp/hooks/hooks.json b/plugins/omo/components/lsp/hooks/hooks.jsonindex a09e8447..11927a8e 100644--- a/plugins/omo/components/lsp/hooks/hooks.json+++ b/plugins/omo/components/lsp/hooks/hooks.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use","timeout": 60,- "statusMessage": "(OmO 4.16.1) Checking LSP Diagnostics"+ "statusMessage": "(OmO 4.16.2) Checking LSP Diagnostics"}]}@@ -21,7 +21,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact","timeout": 5,- "statusMessage": "(OmO 4.16.1) Resetting LSP Diagnostics Cache"+ "statusMessage": "(OmO 4.16.2) Resetting LSP Diagnostics Cache"}]}diff --git a/plugins/omo/components/lsp/package.json b/plugins/omo/components/lsp/package.jsonindex 9c7a2e9f..b0e29d4b 100644--- a/plugins/omo/components/lsp/package.json+++ b/plugins/omo/components/lsp/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-lsp",- "version": "4.16.1",+ "version": "4.16.2","description": "Codex plugin that exposes Language Server Protocol tools and post-edit diagnostics.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/rules/bundled-rules/hephaestus.md b/plugins/omo/components/rules/bundled-rules/hephaestus.mdindex db8169dd..e9eda809 100644--- a/plugins/omo/components/rules/bundled-rules/hephaestus.md+++ b/plugins/omo/components/rules/bundled-rules/hephaestus.md@@ -41,7 +41,7 @@ omo-codex auto-runs LSP diagnostics after every edit and injects the result: any# Subagents-Read-only Codex subagent roles live in `CODEX_HOME/agents/`. Spawn: `multi_agent_v1.spawn_agent({"message":"TASK: act as a <role>. ...","fork_context":false})`+Read-only Codex subagent roles live in `CODEX_HOME/agents/`. Spawn: `multi_agent_v1.spawn_agent({"message":"TASK: act as a <role>. ...","fork_context":false})`. If your tool list instead has a flat `spawn_agent` with a required `task_name` (`multi_agent_v2`): `spawn_agent({"task_name":"<lowercase_digits_underscores>","message":"TASK: act as a <role>. ...","fork_turns":"none"})` — finished agents end on their own; `wait_agent` takes only `timeout_ms`.- `explorer` - codebase search- `librarian` - external docs, OSS code, API contractsdiff --git a/plugins/omo/components/rules/hooks/hooks.json b/plugins/omo/components/rules/hooks/hooks.jsonindex 29b0e61e..1f5ed88f 100644--- a/plugins/omo/components/rules/hooks/hooks.json+++ b/plugins/omo/components/rules/hooks/hooks.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook session-start","timeout": 10,- "statusMessage": "(OmO 4.16.1) Loading Project Rules"+ "statusMessage": "(OmO 4.16.2) Loading Project Rules"}]}@@ -19,7 +19,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit","timeout": 10,- "statusMessage": "(OmO 4.16.1) Loading Project Rules"+ "statusMessage": "(OmO 4.16.2) Loading Project Rules"}]}@@ -32,7 +32,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use","timeout": 10,- "statusMessage": "(OmO 4.16.1) Matching Project Rules"+ "statusMessage": "(OmO 4.16.2) Matching Project Rules"}]}@@ -45,7 +45,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact","timeout": 10,- "statusMessage": "(OmO 4.16.1) Resetting Project Rule Cache"+ "statusMessage": "(OmO 4.16.2) Resetting Project Rule Cache"}]}diff --git a/plugins/omo/components/rules/package.json b/plugins/omo/components/rules/package.jsonindex 196c4416..c5cd1a44 100644--- a/plugins/omo/components/rules/package.json+++ b/plugins/omo/components/rules/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-rules",- "version": "4.16.1",+ "version": "4.16.2","description": "Codex plugin that injects project rule files into model context through lifecycle hooks.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/start-work-continuation/directive.md b/plugins/omo/components/start-work-continuation/directive.mdindex f4d7b8f6..1baead5a 100644--- a/plugins/omo/components/start-work-continuation/directive.md+++ b/plugins/omo/components/start-work-continuation/directive.md@@ -19,7 +19,7 @@ You are mid-flight on a Prometheus work plan; this turn is an automatic continua2. Pick the FIRST unchecked top-level checkbox in `## TODOs` or `## Final Verification Wave`. Ignore nested checkboxes under Acceptance Criteria / Evidence / Definition of Done.3. Follow the `start-work` skill in full. The skill is already loaded from your earlier turn — re-read its file at `packages/omo-codex/plugin/skills/start-work/SKILL.md` if you have lost context.4. Apply the checkbox's tier from its ledger entry, or classify it now per the start-work skill: LIGHT (default — a narrow change inside existing layers) needs one real-surface proof of the deliverable, with auxiliary surfaces first-class for CLI- or data-shaped work, and only trigger-mapped adversarial classes; HEAVY (new module/abstraction, auth/security, external integration, schema/migration, concurrency, cross-domain refactor, care signals) takes the full per-criterion regime. When unsure, take HEAVY; never downgrade.-5. Decompose the checkbox into atomic sub-tasks. Dispatch them in PARALLEL via `multi_agent_v1.spawn_agent` calls in this same response unless a sub-task has a NAMED blocking dependency (input from another sub-task or shared file). Use `fork_context: false` unless full history is truly required. Put role and specialty instructions inside `message`.+5. Decompose the checkbox into atomic sub-tasks. Dispatch them in PARALLEL via `multi_agent_v1.spawn_agent` calls in this same response unless a sub-task has a NAMED blocking dependency (input from another sub-task or shared file). Use `fork_context: false` unless full history is truly required. Put role and specialty instructions inside `message`. Flat `spawn_agent` requiring `task_name` instead (`multi_agent_v2`)? Add `"task_name"`, use `fork_turns: "none"`, `wait_agent` takes only `timeout_ms`, finished agents end on their own.6. Every sub-task message MUST be self-contained, executable, not a context handoff: start with `TASK: <imperative assignment>`, then name `DELIVERABLE`, `SCOPE`, and `VERIFY`. It must include all 7 sections and a Manual-QA channel with exact invocation (`curl`, `send-keys`, `browser:control-in-app-browser` action, `page.click`) and PASS/FAIL observable, plus ultraqa classes, artifact, and cleanup receipt. Channels: HTTP (`curl -i`); terminal/TUI (`send-keys` for boot smoke; xterm.js web terminal for color/visual evidence, never `tmux capture-pane`); browser (Codex: `browser:control-in-app-browser` first unless auth/persistent profile needed; else Chrome/agent-browser); computer use.7. Treat every worker DoneClaim as untrusted input. Run independent AdversarialVerify before any checkbox can become FullyDone; `confirmed` is the only pass verdict, while `false-positive`, `needs-fix`, and `needs-human-review` loop back to the executor with exact feedback.8. Use `multi_agent_v1.wait_agent` for mailbox signals, not proof of completion — a timeout only means no new mailbox update arrived; a running child is alive. For sub-tasks likely to exceed one wait cycle, require `WORKING: <task> - <current phase>` before long passes and `BLOCKED: <reason>` only when progress stops. Send `TASK STILL ACTIVE: return <deliverable> or BLOCKED: <reason>` only when the child is completed without the deliverable, ack-only, or no longer running. If that followup is still silent or ack-only, record inconclusive, do not count it as pass/review approval, close if safe, and respawn a smaller `fork_context: false` task with the missing deliverable.diff --git a/plugins/omo/components/start-work-continuation/hooks/hooks.json b/plugins/omo/components/start-work-continuation/hooks/hooks.jsonindex 56acc733..444d5485 100644--- a/plugins/omo/components/start-work-continuation/hooks/hooks.json+++ b/plugins/omo/components/start-work-continuation/hooks/hooks.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/start-work-continuation/dist/cli.js\" hook stop","timeout": 10,- "statusMessage": "(OmO 4.16.1) Checking Start-Work Continuation"+ "statusMessage": "(OmO 4.16.2) Checking Start-Work Continuation"}]}@@ -19,7 +19,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/start-work-continuation/dist/cli.js\" hook subagent-stop","timeout": 10,- "statusMessage": "(OmO 4.16.1) Checking Start-Work Continuation"+ "statusMessage": "(OmO 4.16.2) Checking Start-Work Continuation"}]}diff --git a/plugins/omo/components/start-work-continuation/package.json b/plugins/omo/components/start-work-continuation/package.jsonindex 0f90cfc2..aec4a438 100644--- a/plugins/omo/components/start-work-continuation/package.json+++ b/plugins/omo/components/start-work-continuation/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-start-work-continuation",- "version": "4.16.1",+ "version": "4.16.2","description": "Codex Stop hook continuation injector for omo-codex start-work plans.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/start-work-continuation/test/codex-hook.test.ts b/plugins/omo/components/start-work-continuation/test/codex-hook.test.tsindex 2edcb644..34b5e2da 100644--- a/plugins/omo/components/start-work-continuation/test/codex-hook.test.ts+++ b/plugins/omo/components/start-work-continuation/test/codex-hook.test.ts@@ -135,7 +135,7 @@ describe("start-work Stop hook", () => {expect(parsed.reason).toMatch(/When unsure[^.]{0,30}HEAVY/);expect(parsed.reason).toMatch(/mirrors its implementation/);expect((parsed.reason.match(/malformed input, prompt injection/g) ?? []).length).toBe(1);- expect(parsed.reason.split(/\s+/).filter(Boolean).length).toBeLessThanOrEqual(1100);+ expect(parsed.reason.split(/\s+/).filter(Boolean).length).toBeLessThanOrEqual(1135);});it("#given active codex work #when continuation directive is emitted #then PR lifecycle stays worktree-bound", () => {diff --git a/plugins/omo/components/teammode/AGENTS.md b/plugins/omo/components/teammode/AGENTS.mdindex 95fd6424..73bbd6b3 100644--- a/plugins/omo/components/teammode/AGENTS.md+++ b/plugins/omo/components/teammode/AGENTS.md@@ -41,6 +41,6 @@ Codex team-mode component. Two deliverables in one dir:- Archive ambiguity: "Ambiguous Codex thread id" from `codex_app.set_thread_archived` is an app-thread archival blocker, not a team-state blocker. Record it via `archive --note`, never claim the thread was archived, never delete team state before evidence is copied or the user accepts the loss.- `integrate` lands member branches with merge commits only (`--no-ff`); never squash or rebase.- `bind-thread` refuses while the team has fewer than 2 members; a single-member team is a subagent, not a team. Member focus, name, and threadTitle must each be unique (case/whitespace-insensitive).-- Every member is a real `codex_app.create_thread` thread bound via `bind-thread`; `multi_agent_v1.spawn_agent` is never a substitute.+- Every member is a real `codex_app.create_thread` thread bound via `bind-thread`; a spawned in-process subagent (`multi_agent_v1.spawn_agent` or flat `spawn_agent`) is never a substitute.- The hook must stay silent (empty stdout) on unrelated tools and malformed payloads; it never blocks a Codex turn.- `init` with an explicit `--session <leader thread id>` makes `leader.sessionId` messageable; without it members cannot report and the leader is stuck polling. Re-running `init` is a safe no-op.diff --git a/plugins/omo/components/teammode/hooks/hooks.json b/plugins/omo/components/teammode/hooks/hooks.jsonindex 4fdaea49..2f5aa10f 100644--- a/plugins/omo/components/teammode/hooks/hooks.json+++ b/plugins/omo/components/teammode/hooks/hooks.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use","timeout": 10,- "statusMessage": "(OmO 4.16.1) Checking Thread Title Hygiene"+ "statusMessage": "(OmO 4.16.2) Checking Thread Title Hygiene"}]}diff --git a/plugins/omo/components/teammode/package.json b/plugins/omo/components/teammode/package.jsonindex 4a39b871..1ef8f475 100644--- a/plugins/omo/components/teammode/package.json+++ b/plugins/omo/components/teammode/package.json@@ -1,6 +1,6 @@{"name": "@sisyphuslabs/codex-teammode",- "version": "4.16.1",+ "version": "4.16.2","description": "Codex team-mode hook component that keeps background thread titles descriptive after create_thread.","type": "module","private": true,diff --git a/plugins/omo/components/teammode/skills/teammode/SKILL.md b/plugins/omo/components/teammode/skills/teammode/SKILL.mdindex df54bdaf..1435a9a3 100644--- a/plugins/omo/components/teammode/skills/teammode/SKILL.md+++ b/plugins/omo/components/teammode/skills/teammode/SKILL.md@@ -19,7 +19,7 @@ Use a TEAM when EITHER holds:- one task still needs exploration, yet its GOAL is already clear - parallel investigation undera fixed objective.-Use plain subagents (`$ulw` / `multi_agent_v1.spawn_agent`) - NOT a team - when EITHER holds:+Use plain subagents (`$ulw` / `multi_agent_v1.spawn_agent` / flat `spawn_agent` on `multi_agent_v2`) - NOT a team - when EITHER holds:- the work IS perfectly isolated, so there is no coordination cost worth paying; or- the GOAL is still ambiguous, where one mind should resolve direction before any fan-out.@@ -39,7 +39,7 @@ merge), not the keystrokes.## Compose by part, ownership, or perspective - not by job titleA team is ALWAYS two or more members - never a single-member team. One worker on an isolated-job is a subagent (`multi_agent_v1.spawn_agent`), not a team; if you end up with a single member,+job is a spawned subagent, not a team; if you end up with a single member,either split off a second distinct slice or drop the team and use a subagent.Compose the team from what you actually KNOW about the work. Ground the split in real knowledge@@ -110,7 +110,7 @@ do not treat the intended mutation as complete; retry after the named command filose in the sidebar without this link.Every team member is a real Codex thread created with `codex_app.create_thread` - this is strict,-not a preference. NEVER substitute `multi_agent_v1.spawn_agent`, or any other in-process subagent,+not a preference. NEVER substitute a spawned in-process subagent (`multi_agent_v1.spawn_agent` or flat `spawn_agent`)for a team member: a spawned agent is an ephemeral helper that does not show up as a team thread,cannot carry the `[team name] <member name>` title, and cannot be inspected, titled, archived, orre-opened with the `codex_app.*` thread tools - which defeats the entire point of a durable team.diff --git a/plugins/omo/components/telemetry/hooks/hooks.json b/plugins/omo/components/telemetry/hooks/hooks.jsonindex 2aee39db..aefc8215 100644--- a/plugins/omo/components/telemetry/hooks/hooks.json+++ b/plugins/omo/components/telemetry/hooks/hooks.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook session-start","timeout": 5,- "statusMessage": "(OmO 4.16.1) Recording Session Telemetry"+ "statusMessage": "(OmO 4.16.2) Recording Session Telemetry"}]}diff --git a/plugins/omo/components/telemetry/package.json b/plugins/omo/components/telemetry/package.jsonindex d8f860f9..d93e7a58 100644--- a/plugins/omo/components/telemetry/package.json+++ b/plugins/omo/components/telemetry/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-telemetry",- "version": "4.16.1",+ "version": "4.16.2","description": "Codex plugin component that emits omo-codex anonymous daily-active telemetry on SessionStart.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/ultrawork/directive.md b/plugins/omo/components/ultrawork/directive.mdindex ecd9828d..065c1e78 100644--- a/plugins/omo/components/ultrawork/directive.md+++ b/plugins/omo/components/ultrawork/directive.md@@ -259,6 +259,7 @@ Every `multi_agent_v1.spawn_agent` message is self-contained and starts withhandoff. Use `fork_context: false` unless full history is trulyrequired; paste only the context the child needs. Full-history forks canmake the child continue old parent context instead of the delegated task.+If your tool list has a flat `spawn_agent` with a required `task_name` instead of `multi_agent_v1.*` (`multi_agent_v2`), rewrite: `fork_context: false` becomes `fork_turns: "none"`, `send_input` becomes `send_message`, finished agents end on their own (no `close_agent`; `followup_task` re-tasks, `interrupt_agent` stops), and `wait_agent` takes only `timeout_ms`, returning on any child mailbox activity.# TOML-backed subagent routing compatibilityTreat TOML-backed role routing as **routing-unverified**. Thediff --git a/plugins/omo/components/ultrawork/hooks/hooks.json b/plugins/omo/components/ultrawork/hooks/hooks.jsonindex 04284752..5f0f0571 100644--- a/plugins/omo/components/ultrawork/hooks/hooks.json+++ b/plugins/omo/components/ultrawork/hooks/hooks.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit","timeout": 5,- "statusMessage": "(OmO 4.16.1) Checking Ultrawork Trigger"+ "statusMessage": "(OmO 4.16.2) Checking Ultrawork Trigger"}]}diff --git a/plugins/omo/components/ultrawork/package.json b/plugins/omo/components/ultrawork/package.jsonindex 182d62b4..63d5db0c 100644--- a/plugins/omo/components/ultrawork/package.json+++ b/plugins/omo/components/ultrawork/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-ultrawork",- "version": "4.16.1",+ "version": "4.16.2","description": "Codex plugin that injects the ultrawork orchestration directive and ships LazyCodex planning, review, QA, and gate agent roles.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/ultrawork/skills/ultrawork/SKILL.md b/plugins/omo/components/ultrawork/skills/ultrawork/SKILL.mdindex 55d0b6cb..34082dd3 100644--- a/plugins/omo/components/ultrawork/skills/ultrawork/SKILL.md+++ b/plugins/omo/components/ultrawork/skills/ultrawork/SKILL.md@@ -266,6 +266,7 @@ Every `multi_agent_v1.spawn_agent` message is self-contained and starts withhandoff. Use `fork_context: false` unless full history is trulyrequired; paste only the context the child needs. Full-history forks canmake the child continue old parent context instead of the delegated task.+If your tool list has a flat `spawn_agent` with a required `task_name` instead of `multi_agent_v1.*` (`multi_agent_v2`), rewrite: `fork_context: false` becomes `fork_turns: "none"`, `send_input` becomes `send_message`, finished agents end on their own (no `close_agent`; `followup_task` re-tasks, `interrupt_agent` stops), and `wait_agent` takes only `timeout_ms`, returning on any child mailbox activity.# TOML-backed subagent routing compatibilityTreat TOML-backed role routing as **routing-unverified**. Thediff --git a/plugins/omo/components/ultrawork/skills/ulw-plan/SKILL.md b/plugins/omo/components/ultrawork/skills/ulw-plan/SKILL.mdindex 4e7a99b3..62fcf6bb 100644--- a/plugins/omo/components/ultrawork/skills/ulw-plan/SKILL.md+++ b/plugins/omo/components/ultrawork/skills/ulw-plan/SKILL.md@@ -67,6 +67,8 @@ Fan out read-only research before deciding. Every spawn names DELIVERABLE / SCOPmulti_agent_v1.spawn_agent({"message":"TASK: act as an explorer. DELIVERABLE: ... SCOPE: ... VERIFY: ...","agent_type":"explorer","fork_context":false})```+If your tool list has a flat `spawn_agent` with a required `task_name` instead of `multi_agent_v1.*` (`multi_agent_v2`), rewrite: add `"task_name":"<lowercase_digits_underscores>"`, replace `"fork_context":false` with `"fork_turns":"none"`, and `wait_agent` takes only `timeout_ms`, returning on any child mailbox activity (finished agents end on their own).+Spawn every independent child for the current wave first. After the waveis launched, use `multi_agent_v1.wait_agent` for each child until eachreaches terminal status. A timeout is not terminal status. Do not start dependent planning, drafting, approval-gate work, or final handoff until each child result is integrated or recorded as inconclusive.diff --git a/plugins/omo/components/ultrawork/skills/ulw-plan/references/full-workflow.md b/plugins/omo/components/ultrawork/skills/ulw-plan/references/full-workflow.mdindex e9d8d3d6..2463969e 100644--- a/plugins/omo/components/ultrawork/skills/ulw-plan/references/full-workflow.md+++ b/plugins/omo/components/ultrawork/skills/ulw-plan/references/full-workflow.md@@ -96,6 +96,8 @@ Every spawn starts with `TASK:`, then DELIVERABLE / SCOPE / VERIFY inside `messamulti_agent_v1.spawn_agent({"message":"TASK: act as an explorer. DELIVERABLE: ... SCOPE: ... VERIFY: ...","agent_type":"explorer","fork_context":false})```+If your tool list has a flat `spawn_agent` with a required `task_name` instead of `multi_agent_v1.*` (`multi_agent_v2`), rewrite: add `"task_name":"<lowercase_digits_underscores>"`, replace `"fork_context":false` with `"fork_turns":"none"`, and `wait_agent` takes only `timeout_ms`, returning on any child mailbox activity (finished agents end on their own — skip the close step).+Roles: `explorer`, `librarian`, `metis`, `momus`. Spawn long plan/reviewer agents in the background and poll with short waits; require the child to send `WORKING: <task> - <phase>` before long passes and `BLOCKED: <reason>` only when progress stops. A wait timeout only means no new mailbox update arrived; treat a running child as alive. Fall back only when the child completed without the deliverable, is ack-only after followup, explicitly `BLOCKED:`, or no longer running; then respawn a smaller `fork_context: false` job. Close each agent after integrating its result.## Stop rulesdiff --git a/plugins/omo/components/ulw-loop/directive.md b/plugins/omo/components/ulw-loop/directive.mdindex ecd9828d..065c1e78 100644--- a/plugins/omo/components/ulw-loop/directive.md+++ b/plugins/omo/components/ulw-loop/directive.md@@ -259,6 +259,7 @@ Every `multi_agent_v1.spawn_agent` message is self-contained and starts withhandoff. Use `fork_context: false` unless full history is trulyrequired; paste only the context the child needs. Full-history forks canmake the child continue old parent context instead of the delegated task.+If your tool list has a flat `spawn_agent` with a required `task_name` instead of `multi_agent_v1.*` (`multi_agent_v2`), rewrite: `fork_context: false` becomes `fork_turns: "none"`, `send_input` becomes `send_message`, finished agents end on their own (no `close_agent`; `followup_task` re-tasks, `interrupt_agent` stops), and `wait_agent` takes only `timeout_ms`, returning on any child mailbox activity.# TOML-backed subagent routing compatibilityTreat TOML-backed role routing as **routing-unverified**. Thediff --git a/plugins/omo/components/ulw-loop/hooks/hooks.json b/plugins/omo/components/ulw-loop/hooks/hooks.jsonindex 43493c87..bb280ad6 100644--- a/plugins/omo/components/ulw-loop/hooks/hooks.json+++ b/plugins/omo/components/ulw-loop/hooks/hooks.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit --with-ultrawork","timeout": 10,- "statusMessage": "(OmO 4.16.1) Checking Ulw-Loop Steering"+ "statusMessage": "(OmO 4.16.2) Checking Ulw-Loop Steering"}]}@@ -20,7 +20,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use","timeout": 5,- "statusMessage": "(OmO 4.16.1) Enforcing Unlimited Ulw-Loop Budget"+ "statusMessage": "(OmO 4.16.2) Enforcing Unlimited Ulw-Loop Budget"}]}diff --git a/plugins/omo/components/ulw-loop/package.json b/plugins/omo/components/ulw-loop/package.jsonindex c71f9278..72c72f97 100644--- a/plugins/omo/components/ulw-loop/package.json+++ b/plugins/omo/components/ulw-loop/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-ulw-loop",- "version": "4.16.1",+ "version": "4.16.2","description": "Codex plugin: durable repo-native multi-goal orchestration with embedded success criteria and observable evidence audit.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/ulw-loop/skills/ulw-loop/SKILL.md b/plugins/omo/components/ulw-loop/skills/ulw-loop/SKILL.mdindex 81a02958..25d5a987 100644--- a/plugins/omo/components/ulw-loop/skills/ulw-loop/SKILL.md+++ b/plugins/omo/components/ulw-loop/skills/ulw-loop/SKILL.md@@ -46,4 +46,6 @@ The full workflow may mention OpenCode-style orchestration examples. In Codex, t| Wait for background result | `multi_agent_v1.wait_agent(...)` || Clean up finished worker | `multi_agent_v1.close_agent(...)` |+Flat `spawn_agent` requiring `task_name` instead (`multi_agent_v2`)? Rewrite rows: add `"task_name"`, `"fork_context":false` → `"fork_turns":"none"`, `wait_agent` takes only `timeout_ms`, no `close_agent` — finished agents end on their own.+When translating `load_skills=[...]`, include the requested skill names in the spawned agent's `message`.diff --git a/plugins/omo/components/ulw-loop/test/skill-contract.test.ts b/plugins/omo/components/ulw-loop/test/skill-contract.test.tsindex 89d3ba96..ec8e98b2 100644--- a/plugins/omo/components/ulw-loop/test/skill-contract.test.ts+++ b/plugins/omo/components/ulw-loop/test/skill-contract.test.ts@@ -65,6 +65,6 @@ describe("ulw-loop skill contract", () => {// thenexpect(workflow.match(/malformed input, prompt injection/g)?.length ?? 0).toBe(1);expect(wordCount(workflow)).toBeLessThanOrEqual(3697);- expect(wordCount(skill)).toBeLessThanOrEqual(611);+ expect(wordCount(skill)).toBeLessThanOrEqual(625);});});diff --git a/plugins/omo/dist/cli-node/index.js b/plugins/omo/dist/cli-node/index.jsindex a6c3d18b..8498c756 100755--- a/plugins/omo/dist/cli-node/index.js+++ b/plugins/omo/dist/cli-node/index.js@@ -2146,7 +2146,7 @@ var package_default;var init_package = __esm(() => {package_default = {name: "oh-my-opencode",- version: "4.16.1",+ version: "4.16.2",description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",main: "./dist/index.js",types: "dist/index.d.ts",@@ -2356,18 +2356,18 @@ var init_package = __esm(() => {typescript: "^6.0.3"},optionalDependencies: {- "oh-my-opencode-darwin-arm64": "4.16.1",- "oh-my-opencode-darwin-x64": "4.16.1",- "oh-my-opencode-darwin-x64-baseline": "4.16.1",- "oh-my-opencode-linux-arm64": "4.16.1",- "oh-my-opencode-linux-arm64-musl": "4.16.1",- "oh-my-opencode-linux-x64": "4.16.1",- "oh-my-opencode-linux-x64-baseline": "4.16.1",- "oh-my-opencode-linux-x64-musl": "4.16.1",- "oh-my-opencode-linux-x64-musl-baseline": "4.16.1",- "oh-my-opencode-windows-arm64": "4.16.1",- "oh-my-opencode-windows-x64": "4.16.1",- "oh-my-opencode-windows-x64-baseline": "4.16.1"+ "oh-my-opencode-darwin-arm64": "4.16.2",+ "oh-my-opencode-darwin-x64": "4.16.2",+ "oh-my-opencode-darwin-x64-baseline": "4.16.2",+ "oh-my-opencode-linux-arm64": "4.16.2",+ "oh-my-opencode-linux-arm64-musl": "4.16.2",+ "oh-my-opencode-linux-x64": "4.16.2",+ "oh-my-opencode-linux-x64-baseline": "4.16.2",+ "oh-my-opencode-linux-x64-musl": "4.16.2",+ "oh-my-opencode-linux-x64-musl-baseline": "4.16.2",+ "oh-my-opencode-windows-arm64": "4.16.2",+ "oh-my-opencode-windows-x64": "4.16.2",+ "oh-my-opencode-windows-x64-baseline": "4.16.2"},overrides: {"@earendil-works/pi-agent-core": "0.80.3",@@ -72497,7 +72497,7 @@ var package_default2;var init_package2 = __esm(() => {package_default2 = {name: "@oh-my-opencode/omo-codex",- version: "4.16.1",+ version: "4.16.2",type: "module",private: true,description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",diff --git a/plugins/omo/dist/cli/index.js b/plugins/omo/dist/cli/index.jsindex 6d2b4b93..878b4335 100755--- a/plugins/omo/dist/cli/index.js+++ b/plugins/omo/dist/cli/index.js@@ -2145,7 +2145,7 @@ var package_default;var init_package = __esm(() => {package_default = {name: "oh-my-opencode",- version: "4.16.1",+ version: "4.16.2",description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",main: "./dist/index.js",types: "dist/index.d.ts",@@ -2355,18 +2355,18 @@ var init_package = __esm(() => {typescript: "^6.0.3"},optionalDependencies: {- "oh-my-opencode-darwin-arm64": "4.16.1",- "oh-my-opencode-darwin-x64": "4.16.1",- "oh-my-opencode-darwin-x64-baseline": "4.16.1",- "oh-my-opencode-linux-arm64": "4.16.1",- "oh-my-opencode-linux-arm64-musl": "4.16.1",- "oh-my-opencode-linux-x64": "4.16.1",- "oh-my-opencode-linux-x64-baseline": "4.16.1",- "oh-my-opencode-linux-x64-musl": "4.16.1",- "oh-my-opencode-linux-x64-musl-baseline": "4.16.1",- "oh-my-opencode-windows-arm64": "4.16.1",- "oh-my-opencode-windows-x64": "4.16.1",- "oh-my-opencode-windows-x64-baseline": "4.16.1"+ "oh-my-opencode-darwin-arm64": "4.16.2",+ "oh-my-opencode-darwin-x64": "4.16.2",+ "oh-my-opencode-darwin-x64-baseline": "4.16.2",+ "oh-my-opencode-linux-arm64": "4.16.2",+ "oh-my-opencode-linux-arm64-musl": "4.16.2",+ "oh-my-opencode-linux-x64": "4.16.2",+ "oh-my-opencode-linux-x64-baseline": "4.16.2",+ "oh-my-opencode-linux-x64-musl": "4.16.2",+ "oh-my-opencode-linux-x64-musl-baseline": "4.16.2",+ "oh-my-opencode-windows-arm64": "4.16.2",+ "oh-my-opencode-windows-x64": "4.16.2",+ "oh-my-opencode-windows-x64-baseline": "4.16.2"},overrides: {"@earendil-works/pi-agent-core": "0.80.3",@@ -72441,7 +72441,7 @@ var package_default2;var init_package2 = __esm(() => {package_default2 = {name: "@oh-my-opencode/omo-codex",- version: "4.16.1",+ version: "4.16.2",type: "module",private: true,description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",diff --git a/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.json b/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.jsonindex 1b6cbf7a..22b83b95 100644--- a/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.json+++ b/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/git-bash/dist/cli.js\" hook post-compact","timeout": 5,- "statusMessage": "(OmO 4.16.1) Resetting Git Bash MCP Reminder",+ "statusMessage": "(OmO 4.16.2) Resetting Git Bash MCP Reminder","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\git-bash\\dist\\cli.js\" hook post-compact"}],diff --git a/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.json b/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.jsonindex 6a784ce0..21230e5f 100644--- a/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.json+++ b/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/lsp/dist/cli.js\" hook post-compact","timeout": 5,- "statusMessage": "(OmO 4.16.1) Resetting LSP Diagnostics Cache",+ "statusMessage": "(OmO 4.16.2) Resetting LSP Diagnostics Cache","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\lsp\\dist\\cli.js\" hook post-compact"}],diff --git a/plugins/omo/hooks/post-compact-resetting-project-rule-cache.json b/plugins/omo/hooks/post-compact-resetting-project-rule-cache.jsonindex 7587cdce..32baa32b 100644--- a/plugins/omo/hooks/post-compact-resetting-project-rule-cache.json+++ b/plugins/omo/hooks/post-compact-resetting-project-rule-cache.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook post-compact","timeout": 10,- "statusMessage": "(OmO 4.16.1) Resetting Project Rule Cache",+ "statusMessage": "(OmO 4.16.2) Resetting Project Rule Cache","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook post-compact"}],diff --git a/plugins/omo/hooks/post-tool-use-checking-codegraph-init-guidance.json b/plugins/omo/hooks/post-tool-use-checking-codegraph-init-guidance.jsonindex 77b3f667..bdf7f210 100644--- a/plugins/omo/hooks/post-tool-use-checking-codegraph-init-guidance.json+++ b/plugins/omo/hooks/post-tool-use-checking-codegraph-init-guidance.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/codegraph/dist/cli.js\" hook post-tool-use","timeout": 5,- "statusMessage": "(OmO 4.16.1) Checking CodeGraph Init Guidance",+ "statusMessage": "(OmO 4.16.2) Checking CodeGraph Init Guidance","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\codegraph\\dist\\cli.js\" hook post-tool-use"}],diff --git a/plugins/omo/hooks/post-tool-use-checking-comments.json b/plugins/omo/hooks/post-tool-use-checking-comments.jsonindex 3f8a156f..70450095 100644--- a/plugins/omo/hooks/post-tool-use-checking-comments.json+++ b/plugins/omo/hooks/post-tool-use-checking-comments.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/comment-checker/dist/cli.js\" hook post-tool-use","timeout": 30,- "statusMessage": "(OmO 4.16.1) Checking Comments",+ "statusMessage": "(OmO 4.16.2) Checking Comments","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\comment-checker\\dist\\cli.js\" hook post-tool-use"}],diff --git a/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.json b/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.jsonindex c715f73d..7d0b4507 100644--- a/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.json+++ b/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/lsp/dist/cli.js\" hook post-tool-use","timeout": 60,- "statusMessage": "(OmO 4.16.1) Checking LSP Diagnostics",+ "statusMessage": "(OmO 4.16.2) Checking LSP Diagnostics","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\lsp\\dist\\cli.js\" hook post-tool-use"}],diff --git a/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.json b/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.jsonindex f60ea8c0..434fbcf1 100644--- a/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.json+++ b/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/teammode/dist/cli.js\" hook post-tool-use","timeout": 10,- "statusMessage": "(OmO 4.16.1) Checking Thread Title Hygiene",+ "statusMessage": "(OmO 4.16.2) Checking Thread Title Hygiene","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\teammode\\dist\\cli.js\" hook post-tool-use"}]diff --git a/plugins/omo/hooks/post-tool-use-matching-project-rules.json b/plugins/omo/hooks/post-tool-use-matching-project-rules.jsonindex 63ef9ec8..eb540be4 100644--- a/plugins/omo/hooks/post-tool-use-matching-project-rules.json+++ b/plugins/omo/hooks/post-tool-use-matching-project-rules.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook post-tool-use","timeout": 10,- "statusMessage": "(OmO 4.16.1) Matching Project Rules",+ "statusMessage": "(OmO 4.16.2) Matching Project Rules","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook post-tool-use"}],diff --git a/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json b/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.jsonindex b479db4b..f3df1709 100644--- a/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json+++ b/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook pre-tool-use","timeout": 5,- "statusMessage": "(OmO 4.16.1) Enforcing Unlimited Goal Budget",+ "statusMessage": "(OmO 4.16.2) Enforcing Unlimited Goal Budget","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook pre-tool-use"}],diff --git a/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.json b/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.jsonindex 998d12bd..7a9c6c27 100644--- a/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.json+++ b/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/git-bash/dist/cli.js\" hook pre-tool-use","timeout": 5,- "statusMessage": "(OmO 4.16.1) Recommending Git Bash MCP",+ "statusMessage": "(OmO 4.16.2) Recommending Git Bash MCP","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\git-bash\\dist\\cli.js\" hook pre-tool-use"}],diff --git a/plugins/omo/hooks/session-start-checking-auto-update.json b/plugins/omo/hooks/session-start-checking-auto-update.jsonindex ce2b5ffe..77d94966 100644--- a/plugins/omo/hooks/session-start-checking-auto-update.json+++ b/plugins/omo/hooks/session-start-checking-auto-update.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/scripts/auto-update.mjs\" hook session-start","timeout": 5,- "statusMessage": "(OmO 4.16.1) Checking Auto Update",+ "statusMessage": "(OmO 4.16.2) Checking Auto Update","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\scripts\\auto-update.mjs\" hook session-start"}],diff --git a/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.json b/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.jsonindex f75e298d..1ceb568f 100644--- a/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.json+++ b/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.json@@ -8,7 +8,7 @@"command": "node \"${PLUGIN_ROOT}/components/bootstrap/dist/cli.js\" hook session-start","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\bootstrap.ps1\"","timeout": 30,- "statusMessage": "(OmO 4.16.1) Checking Bootstrap Provisioning"+ "statusMessage": "(OmO 4.16.2) Checking Bootstrap Provisioning"}]}diff --git a/plugins/omo/hooks/session-start-checking-codegraph-bootstrap.json b/plugins/omo/hooks/session-start-checking-codegraph-bootstrap.jsonindex 052be4f8..429557f1 100644--- a/plugins/omo/hooks/session-start-checking-codegraph-bootstrap.json+++ b/plugins/omo/hooks/session-start-checking-codegraph-bootstrap.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/codegraph/dist/cli.js\" hook session-start","timeout": 5,- "statusMessage": "(OmO 4.16.1) Checking CodeGraph Bootstrap",+ "statusMessage": "(OmO 4.16.2) Checking CodeGraph Bootstrap","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\codegraph\\dist\\cli.js\" hook session-start"}]diff --git a/plugins/omo/hooks/session-start-loading-project-rules.json b/plugins/omo/hooks/session-start-loading-project-rules.jsonindex 8e95b44b..0ed681f7 100644--- a/plugins/omo/hooks/session-start-loading-project-rules.json+++ b/plugins/omo/hooks/session-start-loading-project-rules.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook session-start","timeout": 10,- "statusMessage": "(OmO 4.16.1) Loading Project Rules",+ "statusMessage": "(OmO 4.16.2) Loading Project Rules","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook session-start"}]diff --git a/plugins/omo/hooks/session-start-recording-session-telemetry.json b/plugins/omo/hooks/session-start-recording-session-telemetry.jsonindex 6b96dbc3..b3e464f2 100644--- a/plugins/omo/hooks/session-start-recording-session-telemetry.json+++ b/plugins/omo/hooks/session-start-recording-session-telemetry.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/telemetry/dist/cli.js\" hook session-start","timeout": 5,- "statusMessage": "(OmO 4.16.1) Recording Session Telemetry",+ "statusMessage": "(OmO 4.16.2) Recording Session Telemetry","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\telemetry\\dist\\cli.js\" hook session-start"}]diff --git a/plugins/omo/hooks/stop-checking-start-work-continuation.json b/plugins/omo/hooks/stop-checking-start-work-continuation.jsonindex efeea782..f4fb5e79 100644--- a/plugins/omo/hooks/stop-checking-start-work-continuation.json+++ b/plugins/omo/hooks/stop-checking-start-work-continuation.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/start-work-continuation/dist/cli.js\" hook stop","timeout": 10,- "statusMessage": "(OmO 4.16.1) Checking Start-Work Continuation",+ "statusMessage": "(OmO 4.16.2) Checking Start-Work Continuation","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\start-work-continuation\\dist\\cli.js\" hook stop"}]diff --git a/plugins/omo/hooks/subagent-stop-checking-start-work-continuation.json b/plugins/omo/hooks/subagent-stop-checking-start-work-continuation.jsonindex 79219b9d..26102b35 100644--- a/plugins/omo/hooks/subagent-stop-checking-start-work-continuation.json+++ b/plugins/omo/hooks/subagent-stop-checking-start-work-continuation.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/start-work-continuation/dist/cli.js\" hook subagent-stop","timeout": 10,- "statusMessage": "(OmO 4.16.1) Checking Start-Work Continuation",+ "statusMessage": "(OmO 4.16.2) Checking Start-Work Continuation","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\start-work-continuation\\dist\\cli.js\" hook subagent-stop"}]diff --git a/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json b/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.jsonindex 074ee6ff..91ac0a61 100644--- a/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json+++ b/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/lazycodex-executor-verify/dist/cli.js\" hook subagent-stop","timeout": 10,- "statusMessage": "(OmO 4.16.1) Verifying LazyCodex Executor Evidence",+ "statusMessage": "(OmO 4.16.2) Verifying LazyCodex Executor Evidence","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\lazycodex-executor-verify\\dist\\cli.js\" hook subagent-stop"}],diff --git a/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.json b/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.jsonindex 575ae963..8d3f6cc3 100644--- a/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.json+++ b/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/ultrawork/dist/cli.js\" hook user-prompt-submit","timeout": 5,- "statusMessage": "(OmO 4.16.1) Checking Ultrawork Trigger",+ "statusMessage": "(OmO 4.16.2) Checking Ultrawork Trigger","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ultrawork\\dist\\cli.js\" hook user-prompt-submit"}]diff --git a/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.json b/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.jsonindex 256d1478..8016a2bf 100644--- a/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.json+++ b/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook user-prompt-submit","timeout": 10,- "statusMessage": "(OmO 4.16.1) Checking Ulw-Loop Steering",+ "statusMessage": "(OmO 4.16.2) Checking Ulw-Loop Steering","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook user-prompt-submit"}]diff --git a/plugins/omo/hooks/user-prompt-submit-loading-project-rules.json b/plugins/omo/hooks/user-prompt-submit-loading-project-rules.jsonindex c987bd2b..b35d6752 100644--- a/plugins/omo/hooks/user-prompt-submit-loading-project-rules.json+++ b/plugins/omo/hooks/user-prompt-submit-loading-project-rules.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook user-prompt-submit","timeout": 10,- "statusMessage": "(OmO 4.16.1) Loading Project Rules",+ "statusMessage": "(OmO 4.16.2) Loading Project Rules","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook user-prompt-submit"}]diff --git a/plugins/omo/package-lock.json b/plugins/omo/package-lock.jsonindex 571bc8a4..4f1bf31c 100644--- a/plugins/omo/package-lock.json+++ b/plugins/omo/package-lock.json@@ -1,12 +1,12 @@{"name": "@sisyphuslabs/omo-codex-plugin",- "version": "4.16.1",+ "version": "4.16.2","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "@sisyphuslabs/omo-codex-plugin",- "version": "4.16.1",+ "version": "4.16.2","workspaces": ["components/codegraph","components/comment-checker",@@ -93,7 +93,7 @@},"components/codegraph": {"name": "@sisyphuslabs/codex-codegraph",- "version": "4.16.1",+ "version": "4.16.2","bin": {"omo-codegraph": "dist/cli.js"},@@ -112,7 +112,7 @@},"components/comment-checker": {"name": "@code-yeongyu/codex-comment-checker",- "version": "4.16.1",+ "version": "4.16.2","license": "MIT","bin": {"omo-comment-checker": "dist/cli.js"@@ -133,7 +133,7 @@},"components/git-bash": {"name": "@sisyphuslabs/codex-git-bash-hook",- "version": "4.16.1",+ "version": "4.16.2","bin": {"omo-git-bash-hook": "dist/cli.js"},@@ -148,7 +148,7 @@},"components/lazycodex-executor-verify": {"name": "@code-yeongyu/codex-lazycodex-executor-verify",- "version": "4.16.1",+ "version": "4.16.2","license": "MIT","bin": {"lazycodex-executor-verify": "dist/cli.js"@@ -165,7 +165,7 @@},"components/lsp": {"name": "@code-yeongyu/codex-lsp",- "version": "4.16.1",+ "version": "4.16.2","license": "MIT","dependencies": {"@code-yeongyu/lsp-daemon": "file:../../../../lsp-daemon"@@ -185,7 +185,7 @@},"components/rules": {"name": "@code-yeongyu/codex-rules",- "version": "4.16.1",+ "version": "4.16.2","license": "MIT","dependencies": {"picomatch": "^4.0.3"@@ -207,7 +207,7 @@},"components/start-work-continuation": {"name": "@code-yeongyu/codex-start-work-continuation",- "version": "4.16.1",+ "version": "4.16.2","license": "MIT","bin": {"omo-start-work-continuation": "dist/cli.js"@@ -224,7 +224,7 @@},"components/teammode": {"name": "@sisyphuslabs/codex-teammode",- "version": "4.16.1",+ "version": "4.16.2","devDependencies": {"@types/node": "^25.9.3","bun-types": "^1.3.1",@@ -237,7 +237,7 @@},"components/telemetry": {"name": "@code-yeongyu/codex-telemetry",- "version": "4.16.1",+ "version": "4.16.2","license": "MIT","bin": {"omo-telemetry": "dist/cli.js"@@ -255,7 +255,7 @@},"components/ultrawork": {"name": "@code-yeongyu/codex-ultrawork",- "version": "4.16.1",+ "version": "4.16.2","license": "MIT","bin": {"omo-ultrawork": "dist/cli.js"@@ -273,7 +273,7 @@},"components/ulw-loop": {"name": "@code-yeongyu/codex-ulw-loop",- "version": "4.16.1",+ "version": "4.16.2","license": "MIT","bin": {"omo-ulw-loop": "dist/cli.js",diff --git a/plugins/omo/package.json b/plugins/omo/package.jsonindex f5508085..e4012710 100644--- a/plugins/omo/package.json+++ b/plugins/omo/package.json@@ -1,6 +1,6 @@{"name": "@sisyphuslabs/omo-codex-plugin",- "version": "4.16.1",+ "version": "4.16.2","description": "Aggregate Codex plugin root for OMO components.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/scripts/auto-update.mjs b/plugins/omo/scripts/auto-update.mjsindex cbd104e8..3fb1e338 100644--- a/plugins/omo/scripts/auto-update.mjs+++ b/plugins/omo/scripts/auto-update.mjs@@ -39,6 +39,44 @@ const DEFAULT_RETRY_INTERVAL_MS = 30 * 60 * 1_000;export { resolveLazyCodexUpdatePlan };+/**+ * Read Codex SessionStart stdin JSON and extract the effective session model.+ * @param {NodeJS.ReadableStream | null | undefined} stdin+ * @returns {Promise<string | null>}+ */+export async function readSessionModelFromStdin(stdin = process.stdin) {+ if (!stdin || typeof stdin.on !== "function") return null;+ if (stdin.isTTY) return null;++ const raw = await new Promise((resolve) => {+ let data = "";+ let settled = false;+ const finish = () => {+ if (settled) return;+ settled = true;+ resolve(data);+ };+ stdin.setEncoding("utf8");+ stdin.on("data", (chunk) => {+ data += chunk;+ });+ stdin.once("end", finish);+ stdin.once("error", finish);+ // Hooks normally close stdin quickly; avoid hanging migration forever.+ setTimeout(finish, 250).unref?.();+ });++ const trimmed = raw.trim();+ if (!trimmed) return null;+ try {+ const payload = JSON.parse(trimmed);+ if (typeof payload?.model === "string" && payload.model.trim()) return payload.model.trim();+ return null;+ } catch {+ return null;+ }+}+export function resolveAutoUpdatePlan({ env = process.env, now = Date.now(), lastCheckedAt, lastAttemptedAt, lastStatus, installFlow } = {}) {if (env.LAZYCODEX_AUTO_UPDATE_DISABLED === "1" || env.OMO_CODEX_AUTO_UPDATE_DISABLED === "1") {return { shouldRun: false, reason: "disabled" };@@ -126,8 +164,13 @@ export async function runLazyCodexManualUpdate({ env = process.env, dryRun = falreturn 0;}-export async function runAutoUpdateCheck({ env = process.env, now = Date.now() } = {}) {- const migrationNotices = await runConfigMigration({ env });+export async function runAutoUpdateCheck({+ env = process.env,+ now = Date.now(),+ sessionModel = null,+ requireSessionModel = false,+} = {}) {+ const migrationNotices = await runConfigMigration({ env, sessionModel, requireSessionModel });const statePath = resolveStatePath(env);const notices = [...migrationNotices];const state = await settlePendingNotice({ env, now, statePath, state: await readState(statePath), notices });@@ -251,11 +294,11 @@ function resolveUpdateContext({ env }) {return { currentVersion, latestVersion, shouldUpdate: plan.shouldUpdate };}-async function runConfigMigration({ env }) {+async function runConfigMigration({ env, sessionModel = null, requireSessionModel = false }) {if (env.LAZYCODEX_CONFIG_MIGRATION_DISABLED === "1" || env.OMO_CODEX_CONFIG_MIGRATION_DISABLED === "1") return [];try {await migrateOmoSotConfig({ env, seed: true });- const result = await migrateCodexConfig({ env });+ const result = await migrateCodexConfig({ env, sessionModel, requireSessionModel });if (result.modeChanged.length === 0) return [];return ["[LazyCodex] Removed unsupported Codex root multi_agent_mode from config.toml. Tell the user LazyCodex cleaned up a stale OMO-managed setting so Codex uses its supported per-turn multiAgentMode API.",@@ -267,18 +310,22 @@ async function runConfigMigration({ env }) {}if (process.argv[1] !== undefined && import.meta.url === pathToFileURL(process.argv[1]).href) {- runAutoUpdateCheck()- .then(({ notices }) => {- if (notices.length === 0) return;- console.log(JSON.stringify({- hookSpecificOutput: {- hookEventName: "SessionStart",- additionalContext: notices.join("\n\n"),- },- }));- })- .catch((error) => {- console.error(error instanceof Error ? error.message : String(error));- process.exit(0);+ (async () => {+ const sessionModel = await readSessionModelFromStdin(process.stdin);+ const { notices } = await runAutoUpdateCheck({+ sessionModel,+ // Hook CLI path: only force-disable when SessionStart provided the active model.+ requireSessionModel: true,});+ if (notices.length === 0) return;+ console.log(JSON.stringify({+ hookSpecificOutput: {+ hookEventName: "SessionStart",+ additionalContext: notices.join("\n\n"),+ },+ }));+ })().catch((error) => {+ console.error(error instanceof Error ? error.message : String(error));+ process.exit(0);+ });}diff --git a/plugins/omo/scripts/migrate-codex-config.mjs b/plugins/omo/scripts/migrate-codex-config.mjsindex cb5395aa..5a5ba988 100644--- a/plugins/omo/scripts/migrate-codex-config.mjs+++ b/plugins/omo/scripts/migrate-codex-config.mjs@@ -8,7 +8,10 @@ import { FALLBACK_CATALOG, readModelCatalog } from "./migrate-codex-config/catalimport { configPaths } from "./migrate-codex-config/config-paths.mjs";import { removeStaleContext7PlaceholderMcpServer } from "./migrate-codex-config/context7-placeholder-guard.mjs";import { removeUnsupportedRootMultiAgentMode } from "./migrate-codex-config/multi-agent-mode-guard.mjs";-import { forceDisableMultiAgentV2 } from "./migrate-codex-config/multi-agent-v2-guard.mjs";+import {+ forceDisableMultiAgentV2,+ resolveMultiAgentVersionFromConfig,+} from "./migrate-codex-config/multi-agent-v2-guard.mjs";import { ensureCodexReasoningConfig as applyReasoningProfile, readRootSettings } from "./migrate-codex-config/root-settings.mjs";import { readState, resolveStatePath, writeState } from "./migrate-codex-config/state.mjs";import { ensureSubagentConcurrencyLimit } from "./migrate-codex-config/subagent-limit-guard.mjs";@@ -19,7 +22,12 @@ export function ensureCodexReasoningConfig(config, profile = FALLBACK_CATALOG.cureturn applyReasoningProfile(config, profile);}-export async function migrateCodexConfig({ env = process.env, cwd = process.cwd() } = {}) {+export async function migrateCodexConfig({+ env = process.env,+ cwd = process.cwd(),+ sessionModel = null,+ requireSessionModel = false,+} = {}) {const catalog = await readModelCatalog(env);const statePath = resolveStatePath(env);const state = await readState(statePath);@@ -31,6 +39,9 @@ export async function migrateCodexConfig({ env = process.env, cwd = process.cwd(const result = await migrateConfigFile(configPath, {catalog,previousState: state.files?.[configPath],+ env,+ sessionModel,+ requireSessionModel,});if (result.changed) changed.push(configPath);if (result.multiAgentModeChanged) modeChanged.push(configPath);@@ -44,7 +55,16 @@ export async function migrateCodexConfig({ env = process.env, cwd = process.cwd(return { changed, modeChanged };}-export async function migrateConfigFile(configPath, { catalog = FALLBACK_CATALOG, previousState } = {}) {+export async function migrateConfigFile(+ configPath,+ {+ catalog = FALLBACK_CATALOG,+ previousState,+ env = process.env,+ sessionModel = null,+ requireSessionModel = false,+ } = {},+) {const before = await readConfig(configPath);const decision = shouldApplyCatalog(before, catalog, previousState);@@ -56,7 +76,12 @@ export async function migrateConfigFile(configPath, { catalog = FALLBACK_CATALOGreasoningApplied = config !== before;}- const afterMultiAgentGuard = forceDisableMultiAgentV2(config);+ const multiAgentOptions = { env, sessionModel, requireSessionModel };+ const multiAgentVersion = resolveMultiAgentVersionFromConfig(config, multiAgentOptions);+ const afterMultiAgentGuard = forceDisableMultiAgentV2(config, {+ ...multiAgentOptions,+ multiAgentVersion,+ });const multiAgentChanged = afterMultiAgentGuard !== config;if (multiAgentChanged) config = afterMultiAgentGuard;@@ -68,7 +93,10 @@ export async function migrateConfigFile(configPath, { catalog = FALLBACK_CATALOGconst context7PlaceholderChanged = afterContext7PlaceholderGuard !== config;if (context7PlaceholderChanged) config = afterContext7PlaceholderGuard;- const afterSubagentLimit = ensureSubagentConcurrencyLimit(config);+ const afterSubagentLimit = ensureSubagentConcurrencyLimit(config, {+ ...multiAgentOptions,+ multiAgentVersion,+ });const subagentLimitChanged = afterSubagentLimit !== config;if (subagentLimitChanged) config = afterSubagentLimit;diff --git a/plugins/omo/scripts/migrate-codex-config/multi-agent-v2-guard.mjs b/plugins/omo/scripts/migrate-codex-config/multi-agent-v2-guard.mjsindex e1ad272e..67ce8632 100644--- a/plugins/omo/scripts/migrate-codex-config/multi-agent-v2-guard.mjs+++ b/plugins/omo/scripts/migrate-codex-config/multi-agent-v2-guard.mjs@@ -1,20 +1,31 @@/**- * Runtime migration: force `[features.multi_agent_v2]` to `enabled = false`.+ * Runtime migration for `[features.multi_agent_v2]`.*- * Runs on every Codex SessionStart (via auto-update's config migration) so- * multi-agent V2 stays off regardless of how it was turned on: an- * installer-forced `enabled = true`, a missing `enabled` key the runtime- * would resolve per model, or the `[features]` boolean shorthand- * `multi_agent_v2 = true` (removed here because a boolean key and a- * `[features.multi_agent_v2]` table for the same name are conflicting TOML).+ * Historical behavior (openai/codex#26753): force `enabled = false` on every+ * SessionStart because enabling V2 made every turn 400 with encrypted+ * spawn_agent parameters on models that were not configured for encrypted+ * tool use. OpenAI closed that as NOT_PLANNED (V2 under development).*- * Upstream basis: openai/codex#26753 — with the flag on, EVERY turn fails- * with a 400 ("spawn_agent declares encrypted parameters but is not- * configured for encrypted tool use by this model"), even on prompts that- * never touch subagents. OpenAI closed it NOT_PLANNED stating V2 is under- * development, not recommended, and bug reports are not accepted. Same- * failure class still being reported (openai/codex#27205).+ * GPT-5.6 models that declare `multi_agent_version: "v2"` in the Codex model+ * catalog invert that failure mode: forcing `enabled = false` makes every+ * turn 400 with a reserved `collaboration.spawn_agent` schema mismatch+ * (lazycodex#118 / oh-my-openagent#6002 / openai/codex#31097), and+ * `hide_spawn_agent_metadata = false` (written by OMO installers <= 4.15.x)+ * mismatches the same reserved schema by re-adding agent_type/model+ * properties to spawn_agent. For those models this guard clears the managed+ * disable and the stale metadata override, leaving V2 unset so Codex can+ * follow model metadata.+ *+ * When the selected model is unknown or declares V1, keep the #26753+ * force-disable path.+ *+ * Opt out of the whole migration with LAZYCODEX_CONFIG_MIGRATION_DISABLED=1+ * (or OMO_CODEX_CONFIG_MIGRATION_DISABLED=1).*/+import { readFileSync } from "node:fs";+import { homedir } from "node:os";+import { join } from "node:path";+const MANAGED_COMMENT_MARKER = "openai/codex#26753";const MANAGED_DISABLE_COMMENT = ["# Managed by LazyCodex: multi_agent_v2 is re-disabled on every Codex session start",@@ -23,26 +34,157 @@ const MANAGED_DISABLE_COMMENT = ["",].join("\n");-export function forceDisableMultiAgentV2(config) {- let result = removeFeaturesShorthand(config);+/**+ * @param {string} config+ * @param {{+ * multiAgentVersion?: string | null,+ * sessionModel?: string | null,+ * requireSessionModel?: boolean,+ * env?: NodeJS.ProcessEnv,+ * modelsCachePath?: string,+ * }} [options]+ */+export function forceDisableMultiAgentV2(config, options = {}) {+ // Always normalize the legacy `[features]` boolean shorthand first: leaving+ // `multi_agent_v2 = true|false` in place while a later guard appends the+ // `[features.multi_agent_v2]` table would define the same name as both a+ // scalar and a table, which Codex rejects as invalid TOML.+ const normalized = removeFeaturesShorthand(config);+ const sessionModel = normalizeModel(options.sessionModel);+ const multiAgentVersion =+ options.multiAgentVersion !== undefined+ ? options.multiAgentVersion+ : resolveMultiAgentVersionFromConfig(normalized, options);++ if (prefersMultiAgentV2(multiAgentVersion, sessionModel)) {+ return clearMultiAgentV2DisableForReservedSchema(normalized);+ }++ // SessionStart can run with an override model (`codex -m gpt-5.6-terra`) while+ // config.toml still lists a different default. If we cannot see the effective+ // session model, do not force-disable — writing enabled=false would break a+ // GPT-5.6 reserved collaboration.spawn_agent session.+ if (options.requireSessionModel === true && !sessionModel) {+ return normalized;+ }++ // Unknown catalog entry for an explicit session model: skip force-disable+ // rather than assume the legacy encrypted-V2 failure mode.+ if (sessionModel && multiAgentVersion == null) {+ return normalized;+ }++ return forceDisableLegacyEncryptedV2(normalized);+}++/**+ * True when the effective model should run MultiAgentV2: the catalog says+ * "v2", or the catalog is unavailable but the model is a GPT-5.6 family+ * model (which reserves the collaboration.spawn_agent schema).+ * @param {"v1" | "v2" | null | undefined} multiAgentVersion+ * @param {string | null | undefined} sessionModel+ */+export function prefersMultiAgentV2(multiAgentVersion, sessionModel) {+ return multiAgentVersion === "v2" || (multiAgentVersion == null && isGpt56Family(normalizeModel(sessionModel)));+}++/**+ * Resolve the effective model against Codex `models_cache.json`.+ * Prefers SessionStart `model` over the root `model` in config.toml.+ * @param {string} config+ * @param {{ sessionModel?: string | null, env?: NodeJS.ProcessEnv, modelsCachePath?: string }} [options]+ * @returns {"v1" | "v2" | null}+ */+export function resolveMultiAgentVersionFromConfig(config, options = {}) {+ const model = normalizeModel(options.sessionModel) || readRootModel(config);+ if (!model) return null;+ return resolveMultiAgentVersionForModel(model, options);+}++/**+ * @param {string} model+ * @param {{ env?: NodeJS.ProcessEnv, modelsCachePath?: string }} [options]+ * @returns {"v1" | "v2" | null}+ */+export function resolveMultiAgentVersionForModel(model, options = {}) {+ const cachePath =+ options.modelsCachePath?.trim() ||+ join(options.env?.CODEX_HOME?.trim() || join(homedir(), ".codex"), "models_cache.json");++ try {+ const cache = JSON.parse(readFileSync(cachePath, "utf8"));+ const models = Array.isArray(cache?.models) ? cache.models : [];+ const entry = models.find((item) => item?.slug === model || item?.id === model);+ const version = entry?.multi_agent_version;+ if (version === "v1" || version === "v2") return version;+ return null;+ } catch {+ return null;+ }+}++export function readRootModel(config) {+ const double = config.match(/^\s*model\s*=\s*"([^"]+)"/m);+ if (double) return double[1];+ const single = config.match(/^\s*model\s*=\s*'([^']+)'/m);+ return single?.[1] ?? null;+}++function normalizeModel(value) {+ if (typeof value !== "string") return null;+ const trimmed = value.trim();+ return trimmed.length > 0 ? trimmed : null;+}++function isGpt56Family(model) {+ return typeof model === "string" && /^gpt-5\.6\b/i.test(model);+}++function clearMultiAgentV2DisableForReservedSchema(config) {+ // `config` arrives shorthand-normalized from forceDisableMultiAgentV2.+ const result = removeManagedDisableComments(config);+const section = findSection(result, "[features.multi_agent_v2]");+ if (!section) return result;++ // Two settings poison the reserved collaboration.spawn_agent schema on V2+ // models (verified against codex-cli 0.144.1 + gpt-5.6-sol):+ // - `enabled = false` forces the legacy V1 tool surface on some Codex+ // versions (#6002's failure shape);+ // - `hide_spawn_agent_metadata = false` (written by OMO installers+ // <= 4.15.x to expose agent_type) re-adds agent_type/model/... to+ // spawn_agent, mismatching the reserved schema -> HTTP 400 every turn.+ // Remove both; `hide_spawn_agent_metadata = true` matches the Codex+ // default and is left alone.+ const cleared = section.text+ .replace(/^\s*enabled\s*=\s*false[ \t]*(?:#[^\n]*)?\n?/gm, "")+ .replace(/^\s*hide_spawn_agent_metadata\s*=\s*false[ \t]*(?:#[^\n]*)?\n?/gm, "");+ if (cleared === section.text) return result;+ return result.slice(0, section.start) + cleared + result.slice(section.end);+}++// `config` arrives shorthand-normalized from forceDisableMultiAgentV2.+function forceDisableLegacyEncryptedV2(config) {+ const section = findSection(config, "[features.multi_agent_v2]");if (!section) {- return ensureManagedComment(appendDisabledSection(result));+ return ensureManagedComment(appendDisabledSection(config));}const enabledTruePattern = /^(\s*)enabled\s*=\s*true[ \t]*(#[^\n]*)?$/m;if (enabledTruePattern.test(section.text)) {- const patched = section.text.replace(enabledTruePattern, (_match, indent, comment) => comment ? `${indent}enabled = false ${comment}` : `${indent}enabled = false`);- return ensureManagedComment(result.slice(0, section.start) + patched + result.slice(section.end));+ const patched = section.text.replace(enabledTruePattern, (_match, indent, comment) =>+ comment ? `${indent}enabled = false ${comment}` : `${indent}enabled = false`,+ );+ return ensureManagedComment(config.slice(0, section.start) + patched + config.slice(section.end));}- if (/^\s*enabled\s*=\s*false[ \t]*(?:#[^\n]*)?$/m.test(section.text)) return result;+ if (/^\s*enabled\s*=\s*false[ \t]*(?:#[^\n]*)?$/m.test(section.text)) return config;const headerEnd = section.text.indexOf("\n");const insertAt = headerEnd === -1 ? section.text.length : headerEnd + 1;const patched = `${section.text.slice(0, insertAt)}${headerEnd === -1 ? "\n" : ""}enabled = false\n${section.text.slice(insertAt)}`;- return ensureManagedComment(result.slice(0, section.start) + patched + result.slice(section.end));+ return ensureManagedComment(config.slice(0, section.start) + patched + config.slice(section.end));}function ensureManagedComment(config) {@@ -52,6 +194,30 @@ function ensureManagedComment(config) {return config.slice(0, section.start) + MANAGED_DISABLE_COMMENT + config.slice(section.start);}+function removeManagedDisableComments(config) {+ if (!config.includes(MANAGED_COMMENT_MARKER) && !config.includes("Managed by LazyCodex: multi_agent_v2")) {+ return config;+ }++ const lines = config.split("\n");+ const kept = [];+ for (const line of lines) {+ const trimmed = line.trim();+ if (+ trimmed.startsWith("#") &&+ (trimmed.includes(MANAGED_COMMENT_MARKER) ||+ trimmed.includes("Managed by LazyCodex: multi_agent_v2") ||+ trimmed.includes("because enabling it fails every turn with HTTP 400") ||+ trimmed.includes("LAZYCODEX_CONFIG_MIGRATION_DISABLED=1") ||+ trimmed.includes("OMO_CODEX_CONFIG_MIGRATION_DISABLED=1"))+ ) {+ continue;+ }+ kept.push(line);+ }+ return kept.join("\n").replace(/\n{3,}/g, "\n\n");+}+function removeFeaturesShorthand(config) {const section = findSection(config, "[features]");if (!section) return config;diff --git a/plugins/omo/scripts/migrate-codex-config/subagent-limit-guard.mjs b/plugins/omo/scripts/migrate-codex-config/subagent-limit-guard.mjsindex f652ac89..428523c0 100644--- a/plugins/omo/scripts/migrate-codex-config/subagent-limit-guard.mjs+++ b/plugins/omo/scripts/migrate-codex-config/subagent-limit-guard.mjs@@ -1,9 +1,39 @@+import { prefersMultiAgentV2, resolveMultiAgentVersionFromConfig } from "./multi-agent-v2-guard.mjs";+const CODEX_AGENTS_HEADER = "[agents]";const CODEX_MULTI_AGENT_V2_HEADER = "[features.multi_agent_v2]";const CODEX_SUBAGENT_THREAD_LIMIT = "1000";-export function ensureSubagentConcurrencyLimit(config) {- return ensureMultiAgentV2ThreadLimit(ensureAgentsMaxThreads(config));+/**+ * Ensure subagent concurrency limits without writing settings that conflict+ * with MultiAgentV2. When the selected model prefers V2 (catalog `v2`, or a+ * GPT-5.6 family session model with the catalog unavailable) or V2 is already+ * enabled in config, skip `agents.max_threads` because Codex rejects that key+ * while features.multi_agent_v2 is enabled.+ *+ * @param {string} config+ * @param {{ multiAgentVersion?: string | null, sessionModel?: string | null, env?: NodeJS.ProcessEnv, modelsCachePath?: string }} [options]+ */+export function ensureSubagentConcurrencyLimit(config, options = {}) {+ const multiAgentVersion =+ options.multiAgentVersion !== undefined+ ? options.multiAgentVersion+ : resolveMultiAgentVersionFromConfig(config, options);+ const v2Preferred = prefersMultiAgentV2(multiAgentVersion, options.sessionModel) || isMultiAgentV2Enabled(config);++ let result = config;+ if (!v2Preferred) {+ result = ensureAgentsMaxThreads(result);+ } else {+ result = removeAgentsMaxThreads(result);+ }+ return ensureMultiAgentV2ThreadLimit(result);+}++function isMultiAgentV2Enabled(config) {+ const section = findSection(config, CODEX_MULTI_AGENT_V2_HEADER);+ if (!section) return false;+ return /^\s*enabled\s*=\s*true[ \t]*(?:#[^\n]*)?$/m.test(section.text);}function ensureAgentsMaxThreads(config) {@@ -12,6 +42,22 @@ function ensureAgentsMaxThreads(config) {return replaceOrInsertSetting(config, section, "max_threads", CODEX_SUBAGENT_THREAD_LIMIT);}+function removeAgentsMaxThreads(config) {+ const section = findSection(config, CODEX_AGENTS_HEADER);+ if (!section) return config;+ if (!/^\s*max_threads\s*=/m.test(section.text)) return config;++ const patched = section.text.replace(/^\s*max_threads\s*=\s*[^\n]*\n?/m, "");+ const bodyLines = patched+ .split("\n")+ .slice(1)+ .filter((line) => line.trim() !== "");+ if (bodyLines.length === 0) {+ return config.slice(0, section.start) + config.slice(section.end).replace(/^\n+/, "");+ }+ return config.slice(0, section.start) + patched + config.slice(section.end);+}+function ensureMultiAgentV2ThreadLimit(config) {const section = findSection(config, CODEX_MULTI_AGENT_V2_HEADER);if (!section) {@@ -26,7 +72,9 @@ function ensureMultiAgentV2ThreadLimit(config) {function replaceOrInsertSetting(config, section, key, value) {const pattern = new RegExp(`^(\\s*)${escapeRegExp(key)}\\s*=\\s*[^\\n#]*(#[^\\n]*)?$`, "m");if (pattern.test(section.text)) {- const patched = section.text.replace(pattern, (_match, indent, comment) => comment ? `${indent}${key} = ${value} ${comment}` : `${indent}${key} = ${value}`);+ const patched = section.text.replace(pattern, (_match, indent, comment) =>+ comment ? `${indent}${key} = ${value} ${comment}` : `${indent}${key} = ${value}`,+ );return config.slice(0, section.start) + patched + config.slice(section.end);}diff --git a/plugins/omo/scripts/sync-skills.mjs b/plugins/omo/scripts/sync-skills.mjsindex 35c9f4aa..071c6f27 100644--- a/plugins/omo/scripts/sync-skills.mjs+++ b/plugins/omo/scripts/sync-skills.mjs@@ -52,7 +52,7 @@ This skill may include examples copied from the OpenCode harness. In Codex, do nRole-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.-On \`multi_agent_v2\` sessions the same \`agent_type\` applies (the OMO installer exposes it) with \`fork_turns\` instead of \`fork_context\`. If a code block below conflicts with this section, this section wins.+Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If \`multi_agent_v1.*\` tools exist, use the table above as written. If instead a flat \`spawn_agent\` with a required \`task_name\` exists (\`multi_agent_v2\`), rewrite every \`multi_agent_v1.*\` example: \`multi_agent_v1.spawn_agent({...,"fork_context":false})\` becomes \`spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})\` (\`"all"\` only when full parent history is truly required); \`send_input\` becomes \`send_message\`; do not call \`close_agent\`/\`resume_agent\` (finished agents end on their own; \`followup_task\` re-tasks one, \`interrupt_agent\` stops one); \`wait_agent\` takes only \`timeout_ms\` and returns on any child mailbox activity. \`agent_type\` works the same on both surfaces. If a code block below conflicts with this section, this section wins.When translating \`load_skills=[...]\`, include the requested skill names in the spawned agent's \`message\`. If a code block below conflicts with this section, this section wins.diff --git a/plugins/omo/skills/init-deep/SKILL.md b/plugins/omo/skills/init-deep/SKILL.mdindex c81ecfcd..61f96113 100644--- a/plugins/omo/skills/init-deep/SKILL.md+++ b/plugins/omo/skills/init-deep/SKILL.md@@ -18,7 +18,7 @@ This skill may include examples copied from the OpenCode harness. In Codex, do nRole-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.-On `multi_agent_v2` sessions the same `agent_type` applies (the OMO installer exposes it) with `fork_turns` instead of `fork_context`. If a code block below conflicts with this section, this section wins.+Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If `multi_agent_v1.*` tools exist, use the table above as written. If instead a flat `spawn_agent` with a required `task_name` exists (`multi_agent_v2`), rewrite every `multi_agent_v1.*` example: `multi_agent_v1.spawn_agent({...,"fork_context":false})` becomes `spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})` (`"all"` only when full parent history is truly required); `send_input` becomes `send_message`; do not call `close_agent`/`resume_agent` (finished agents end on their own; `followup_task` re-tasks one, `interrupt_agent` stops one); `wait_agent` takes only `timeout_ms` and returns on any child mailbox activity. `agent_type` works the same on both surfaces. If a code block below conflicts with this section, this section wins.When translating `load_skills=[...]`, include the requested skill names in the spawned agent's `message`. If a code block below conflicts with this section, this section wins.diff --git a/plugins/omo/skills/refactor/SKILL.md b/plugins/omo/skills/refactor/SKILL.mdindex b8371c09..cb76c5a1 100644--- a/plugins/omo/skills/refactor/SKILL.md+++ b/plugins/omo/skills/refactor/SKILL.md@@ -19,7 +19,7 @@ This skill may include examples copied from the OpenCode harness. In Codex, do nRole-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.-On `multi_agent_v2` sessions the same `agent_type` applies (the OMO installer exposes it) with `fork_turns` instead of `fork_context`. If a code block below conflicts with this section, this section wins.+Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If `multi_agent_v1.*` tools exist, use the table above as written. If instead a flat `spawn_agent` with a required `task_name` exists (`multi_agent_v2`), rewrite every `multi_agent_v1.*` example: `multi_agent_v1.spawn_agent({...,"fork_context":false})` becomes `spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})` (`"all"` only when full parent history is truly required); `send_input` becomes `send_message`; do not call `close_agent`/`resume_agent` (finished agents end on their own; `followup_task` re-tasks one, `interrupt_agent` stops one); `wait_agent` takes only `timeout_ms` and returns on any child mailbox activity. `agent_type` works the same on both surfaces. If a code block below conflicts with this section, this section wins.When translating `load_skills=[...]`, include the requested skill names in the spawned agent's `message`. If a code block below conflicts with this section, this section wins.diff --git a/plugins/omo/skills/remove-ai-slops/SKILL.md b/plugins/omo/skills/remove-ai-slops/SKILL.mdindex 4b8be714..253674f9 100644--- a/plugins/omo/skills/remove-ai-slops/SKILL.md+++ b/plugins/omo/skills/remove-ai-slops/SKILL.md@@ -19,7 +19,7 @@ This skill may include examples copied from the OpenCode harness. In Codex, do nRole-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.-On `multi_agent_v2` sessions the same `agent_type` applies (the OMO installer exposes it) with `fork_turns` instead of `fork_context`. If a code block below conflicts with this section, this section wins.+Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If `multi_agent_v1.*` tools exist, use the table above as written. If instead a flat `spawn_agent` with a required `task_name` exists (`multi_agent_v2`), rewrite every `multi_agent_v1.*` example: `multi_agent_v1.spawn_agent({...,"fork_context":false})` becomes `spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})` (`"all"` only when full parent history is truly required); `send_input` becomes `send_message`; do not call `close_agent`/`resume_agent` (finished agents end on their own; `followup_task` re-tasks one, `interrupt_agent` stops one); `wait_agent` takes only `timeout_ms` and returns on any child mailbox activity. `agent_type` works the same on both surfaces. If a code block below conflicts with this section, this section wins.When translating `load_skills=[...]`, include the requested skill names in the spawned agent's `message`. If a code block below conflicts with this section, this section wins.diff --git a/plugins/omo/skills/review-work/SKILL.md b/plugins/omo/skills/review-work/SKILL.mdindex 4f235385..e25f51b8 100644--- a/plugins/omo/skills/review-work/SKILL.md+++ b/plugins/omo/skills/review-work/SKILL.md@@ -18,7 +18,7 @@ This skill may include examples copied from the OpenCode harness. In Codex, do nRole-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.-On `multi_agent_v2` sessions the same `agent_type` applies (the OMO installer exposes it) with `fork_turns` instead of `fork_context`. If a code block below conflicts with this section, this section wins.+Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If `multi_agent_v1.*` tools exist, use the table above as written. If instead a flat `spawn_agent` with a required `task_name` exists (`multi_agent_v2`), rewrite every `multi_agent_v1.*` example: `multi_agent_v1.spawn_agent({...,"fork_context":false})` becomes `spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})` (`"all"` only when full parent history is truly required); `send_input` becomes `send_message`; do not call `close_agent`/`resume_agent` (finished agents end on their own; `followup_task` re-tasks one, `interrupt_agent` stops one); `wait_agent` takes only `timeout_ms` and returns on any child mailbox activity. `agent_type` works the same on both surfaces. If a code block below conflicts with this section, this section wins.When translating `load_skills=[...]`, include the requested skill names in the spawned agent's `message`. If a code block below conflicts with this section, this section wins.diff --git a/plugins/omo/skills/start-work/SKILL.md b/plugins/omo/skills/start-work/SKILL.mdindex 3b4c297c..44d25330 100644--- a/plugins/omo/skills/start-work/SKILL.md+++ b/plugins/omo/skills/start-work/SKILL.md@@ -19,7 +19,7 @@ This skill may include examples copied from the OpenCode harness. In Codex, do nRole-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.-On `multi_agent_v2` sessions the same `agent_type` applies (the OMO installer exposes it) with `fork_turns` instead of `fork_context`. If a code block below conflicts with this section, this section wins.+Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If `multi_agent_v1.*` tools exist, use the table above as written. If instead a flat `spawn_agent` with a required `task_name` exists (`multi_agent_v2`), rewrite every `multi_agent_v1.*` example: `multi_agent_v1.spawn_agent({...,"fork_context":false})` becomes `spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})` (`"all"` only when full parent history is truly required); `send_input` becomes `send_message`; do not call `close_agent`/`resume_agent` (finished agents end on their own; `followup_task` re-tasks one, `interrupt_agent` stops one); `wait_agent` takes only `timeout_ms` and returns on any child mailbox activity. `agent_type` works the same on both surfaces. If a code block below conflicts with this section, this section wins.When translating `load_skills=[...]`, include the requested skill names in the spawned agent's `message`. If a code block below conflicts with this section, this section wins.diff --git a/plugins/omo/skills/teammode/SKILL.md b/plugins/omo/skills/teammode/SKILL.mdindex df54bdaf..1435a9a3 100644--- a/plugins/omo/skills/teammode/SKILL.md+++ b/plugins/omo/skills/teammode/SKILL.md@@ -19,7 +19,7 @@ Use a TEAM when EITHER holds:- one task still needs exploration, yet its GOAL is already clear - parallel investigation undera fixed objective.-Use plain subagents (`$ulw` / `multi_agent_v1.spawn_agent`) - NOT a team - when EITHER holds:+Use plain subagents (`$ulw` / `multi_agent_v1.spawn_agent` / flat `spawn_agent` on `multi_agent_v2`) - NOT a team - when EITHER holds:- the work IS perfectly isolated, so there is no coordination cost worth paying; or- the GOAL is still ambiguous, where one mind should resolve direction before any fan-out.@@ -39,7 +39,7 @@ merge), not the keystrokes.## Compose by part, ownership, or perspective - not by job titleA team is ALWAYS two or more members - never a single-member team. One worker on an isolated-job is a subagent (`multi_agent_v1.spawn_agent`), not a team; if you end up with a single member,+job is a spawned subagent, not a team; if you end up with a single member,either split off a second distinct slice or drop the team and use a subagent.Compose the team from what you actually KNOW about the work. Ground the split in real knowledge@@ -110,7 +110,7 @@ do not treat the intended mutation as complete; retry after the named command filose in the sidebar without this link.Every team member is a real Codex thread created with `codex_app.create_thread` - this is strict,-not a preference. NEVER substitute `multi_agent_v1.spawn_agent`, or any other in-process subagent,+not a preference. NEVER substitute a spawned in-process subagent (`multi_agent_v1.spawn_agent` or flat `spawn_agent`)for a team member: a spawned agent is an ephemeral helper that does not show up as a team thread,cannot carry the `[team name] <member name>` title, and cannot be inspected, titled, archived, orre-opened with the `codex_app.*` thread tools - which defeats the entire point of a durable team.diff --git a/plugins/omo/skills/ultrawork/SKILL.md b/plugins/omo/skills/ultrawork/SKILL.mdindex 55d0b6cb..34082dd3 100644--- a/plugins/omo/skills/ultrawork/SKILL.md+++ b/plugins/omo/skills/ultrawork/SKILL.md@@ -266,6 +266,7 @@ Every `multi_agent_v1.spawn_agent` message is self-contained and starts withhandoff. Use `fork_context: false` unless full history is trulyrequired; paste only the context the child needs. Full-history forks canmake the child continue old parent context instead of the delegated task.+If your tool list has a flat `spawn_agent` with a required `task_name` instead of `multi_agent_v1.*` (`multi_agent_v2`), rewrite: `fork_context: false` becomes `fork_turns: "none"`, `send_input` becomes `send_message`, finished agents end on their own (no `close_agent`; `followup_task` re-tasks, `interrupt_agent` stops), and `wait_agent` takes only `timeout_ms`, returning on any child mailbox activity.# TOML-backed subagent routing compatibilityTreat TOML-backed role routing as **routing-unverified**. Thediff --git a/plugins/omo/skills/ulw-loop/SKILL.md b/plugins/omo/skills/ulw-loop/SKILL.mdindex 81a02958..25d5a987 100644--- a/plugins/omo/skills/ulw-loop/SKILL.md+++ b/plugins/omo/skills/ulw-loop/SKILL.md@@ -46,4 +46,6 @@ The full workflow may mention OpenCode-style orchestration examples. In Codex, t| Wait for background result | `multi_agent_v1.wait_agent(...)` || Clean up finished worker | `multi_agent_v1.close_agent(...)` |+Flat `spawn_agent` requiring `task_name` instead (`multi_agent_v2`)? Rewrite rows: add `"task_name"`, `"fork_context":false` → `"fork_turns":"none"`, `wait_agent` takes only `timeout_ms`, no `close_agent` — finished agents end on their own.+When translating `load_skills=[...]`, include the requested skill names in the spawned agent's `message`.diff --git a/plugins/omo/skills/ulw-plan/SKILL.md b/plugins/omo/skills/ulw-plan/SKILL.mdindex 4e7a99b3..62fcf6bb 100644--- a/plugins/omo/skills/ulw-plan/SKILL.md+++ b/plugins/omo/skills/ulw-plan/SKILL.md@@ -67,6 +67,8 @@ Fan out read-only research before deciding. Every spawn names DELIVERABLE / SCOPmulti_agent_v1.spawn_agent({"message":"TASK: act as an explorer. DELIVERABLE: ... SCOPE: ... VERIFY: ...","agent_type":"explorer","fork_context":false})```+If your tool list has a flat `spawn_agent` with a required `task_name` instead of `multi_agent_v1.*` (`multi_agent_v2`), rewrite: add `"task_name":"<lowercase_digits_underscores>"`, replace `"fork_context":false` with `"fork_turns":"none"`, and `wait_agent` takes only `timeout_ms`, returning on any child mailbox activity (finished agents end on their own).+Spawn every independent child for the current wave first. After the waveis launched, use `multi_agent_v1.wait_agent` for each child until eachreaches terminal status. A timeout is not terminal status. Do not start dependent planning, drafting, approval-gate work, or final handoff until each child result is integrated or recorded as inconclusive.diff --git a/plugins/omo/skills/ulw-plan/references/full-workflow.md b/plugins/omo/skills/ulw-plan/references/full-workflow.mdindex e9d8d3d6..2463969e 100644--- a/plugins/omo/skills/ulw-plan/references/full-workflow.md+++ b/plugins/omo/skills/ulw-plan/references/full-workflow.md@@ -96,6 +96,8 @@ Every spawn starts with `TASK:`, then DELIVERABLE / SCOPE / VERIFY inside `messamulti_agent_v1.spawn_agent({"message":"TASK: act as an explorer. DELIVERABLE: ... SCOPE: ... VERIFY: ...","agent_type":"explorer","fork_context":false})```+If your tool list has a flat `spawn_agent` with a required `task_name` instead of `multi_agent_v1.*` (`multi_agent_v2`), rewrite: add `"task_name":"<lowercase_digits_underscores>"`, replace `"fork_context":false` with `"fork_turns":"none"`, and `wait_agent` takes only `timeout_ms`, returning on any child mailbox activity (finished agents end on their own — skip the close step).+Roles: `explorer`, `librarian`, `metis`, `momus`. Spawn long plan/reviewer agents in the background and poll with short waits; require the child to send `WORKING: <task> - <phase>` before long passes and `BLOCKED: <reason>` only when progress stops. A wait timeout only means no new mailbox update arrived; treat a running child as alive. Fall back only when the child completed without the deliverable, is ack-only after followup, explicitly `BLOCKED:`, or no longer running; then respawn a smaller `fork_context: false` job. Close each agent after integrating its result.## Stop rulesdiff --git a/plugins/omo/skills/ulw-research/SKILL.md b/plugins/omo/skills/ulw-research/SKILL.mdindex 5b6d898c..f0ec47ef 100644--- a/plugins/omo/skills/ulw-research/SKILL.md+++ b/plugins/omo/skills/ulw-research/SKILL.md@@ -19,7 +19,7 @@ This skill may include examples copied from the OpenCode harness. In Codex, do nRole-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.-On `multi_agent_v2` sessions the same `agent_type` applies (the OMO installer exposes it) with `fork_turns` instead of `fork_context`. If a code block below conflicts with this section, this section wins.+Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If `multi_agent_v1.*` tools exist, use the table above as written. If instead a flat `spawn_agent` with a required `task_name` exists (`multi_agent_v2`), rewrite every `multi_agent_v1.*` example: `multi_agent_v1.spawn_agent({...,"fork_context":false})` becomes `spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})` (`"all"` only when full parent history is truly required); `send_input` becomes `send_message`; do not call `close_agent`/`resume_agent` (finished agents end on their own; `followup_task` re-tasks one, `interrupt_agent` stops one); `wait_agent` takes only `timeout_ms` and returns on any child mailbox activity. `agent_type` works the same on both surfaces. If a code block below conflicts with this section, this section wins.When translating `load_skills=[...]`, include the requested skill names in the spawned agent's `message`. If a code block below conflicts with this section, this section wins.diff --git a/plugins/omo/skills/visual-qa/SKILL.md b/plugins/omo/skills/visual-qa/SKILL.mdindex bbf5d604..62d6fabd 100644--- a/plugins/omo/skills/visual-qa/SKILL.md+++ b/plugins/omo/skills/visual-qa/SKILL.md@@ -19,7 +19,7 @@ This skill may include examples copied from the OpenCode harness. In Codex, do nRole-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.-On `multi_agent_v2` sessions the same `agent_type` applies (the OMO installer exposes it) with `fork_turns` instead of `fork_context`. If a code block below conflicts with this section, this section wins.+Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If `multi_agent_v1.*` tools exist, use the table above as written. If instead a flat `spawn_agent` with a required `task_name` exists (`multi_agent_v2`), rewrite every `multi_agent_v1.*` example: `multi_agent_v1.spawn_agent({...,"fork_context":false})` becomes `spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})` (`"all"` only when full parent history is truly required); `send_input` becomes `send_message`; do not call `close_agent`/`resume_agent` (finished agents end on their own; `followup_task` re-tasks one, `interrupt_agent` stops one); `wait_agent` takes only `timeout_ms` and returns on any child mailbox activity. `agent_type` works the same on both surfaces. If a code block below conflicts with this section, this section wins.When translating `load_skills=[...]`, include the requested skill names in the spawned agent's `message`. If a code block below conflicts with this section, this section wins.diff --git a/plugins/omo/test/aggregate-plugin-fixture.mjs b/plugins/omo/test/aggregate-plugin-fixture.mjsindex 3be956c2..57e2e014 100644--- a/plugins/omo/test/aggregate-plugin-fixture.mjs+++ b/plugins/omo/test/aggregate-plugin-fixture.mjs@@ -88,7 +88,7 @@ export function findSpawnAgentCallsWithoutForkContextFalse(content) {const regex = /spawn_agent\(([^)]*)\)/g;for (const match of content.matchAll(regex)) {const call = match[0];- if (!/"fork_context"\s*:\s*false|fork_context:\s*false|fork_context=false/.test(call)) {+ if (!/"fork_context"\s*:\s*false|fork_context:\s*false|fork_context=false|"fork_turns"\s*:\s*"none"|fork_turns:\s*"none"|fork_turns="none"/.test(call)) {missingForkContext.push(call);}}diff --git a/plugins/omo/test/auto-update.test.mjs b/plugins/omo/test/auto-update.test.mjsindex 30e1690b..46a0a752 100644--- a/plugins/omo/test/auto-update.test.mjs+++ b/plugins/omo/test/auto-update.test.mjs@@ -2,9 +2,10 @@ import assert from "node:assert/strict";import { mkdir, mkdtemp, readFile, symlink, utimes, writeFile } from "node:fs/promises";import { tmpdir } from "node:os";import { join } from "node:path";+import { PassThrough } from "node:stream";import test from "node:test";-import { resolveAutoUpdatePlan, resolveLazyCodexUpdatePlan, runAutoUpdateCheck } from "../scripts/auto-update.mjs";+import { readSessionModelFromStdin, resolveAutoUpdatePlan, resolveLazyCodexUpdatePlan, runAutoUpdateCheck } from "../scripts/auto-update.mjs";import { detectInstallFlow } from "../scripts/install-flow.mjs";import { resolveSpawnInvocation } from "../scripts/spawn-command.mjs";@@ -20,6 +21,12 @@ function autoUpdateEnv(root, extra = {}) {};}+function stdinFrom(payload) {+ const stream = new PassThrough();+ stream.end(payload);+ return stream;+}+test("#given auto update is disabled #when resolving plan #then no command is scheduled", () => {const plan = resolveAutoUpdatePlan({env: { LAZYCODEX_AUTO_UPDATE_DISABLED: "1" },@@ -31,6 +38,33 @@ test("#given auto update is disabled #when resolving plan #then no command is scassert.equal(plan.reason, "disabled");});+test("#given SessionStart payload with model #when reading stdin #then returns the model", async () => {+ const payload = JSON.stringify({+ hook_event_name: "SessionStart",+ session_id: "s-1",+ cwd: "/tmp",+ model: "gpt-5.6-terra",+ permission_mode: "default",+ source: "startup",+ });++ assert.equal(await readSessionModelFromStdin(stdinFrom(payload)), "gpt-5.6-terra");+});++test("#given empty or malformed stdin #when reading session model #then returns null", async () => {+ assert.equal(await readSessionModelFromStdin(stdinFrom("")), null);+ assert.equal(await readSessionModelFromStdin(stdinFrom("not json")), null);+ assert.equal(await readSessionModelFromStdin(stdinFrom(JSON.stringify({ model: " " }))), null);+ assert.equal(await readSessionModelFromStdin(stdinFrom(JSON.stringify({ session_id: "s-1" }))), null);+ assert.equal(await readSessionModelFromStdin(null), null);+});++test("#given a TTY stdin #when reading session model #then returns null without waiting", async () => {+ const stream = stdinFrom("{}");+ stream.isTTY = true;+ assert.equal(await readSessionModelFromStdin(stream), null);+});+test("#given stale state #when resolving plan #then installer update command is scheduled", () => {const plan = resolveAutoUpdatePlan({env: { LAZYCODEX_CURRENT_VERSION: "1.0.0", LAZYCODEX_LATEST_VERSION: "1.0.1" },diff --git a/plugins/omo/test/migrate-codex-config.test.mjs b/plugins/omo/test/migrate-codex-config.test.mjsindex 01eb27f0..5a076012 100644--- a/plugins/omo/test/migrate-codex-config.test.mjs+++ b/plugins/omo/test/migrate-codex-config.test.mjs@@ -493,7 +493,7 @@ test("#given multi_agent_v2 enabled #when forcing disable #then flips the flag t"",].join("\n");- const result = forceDisableMultiAgentV2(config);+ const result = forceDisableMultiAgentV2(config, { multiAgentVersion: null });assert.match(result, /enabled = false/);assert.doesNotMatch(result, /enabled = true/);@@ -510,7 +510,7 @@ test("#given no multi_agent_v2 section #when forcing disable #then appends a dis"",].join("\n");- const result = forceDisableMultiAgentV2(config);+ const result = forceDisableMultiAgentV2(config, { multiAgentVersion: null });assert.match(result, /\[features\.multi_agent_v2\]\nenabled = false\n/);assert.match(result, /plugins = true/);@@ -525,7 +525,7 @@ test("#given multi_agent_v2 section without enabled key #when forcing disable #t"",].join("\n");- const result = forceDisableMultiAgentV2(config);+ const result = forceDisableMultiAgentV2(config, { multiAgentVersion: null });assert.match(result, /\[features\.multi_agent_v2\]\nenabled = false\n/);assert.match(result, /max_concurrent_threads_per_session = 10000/);@@ -541,7 +541,7 @@ test("#given [features] boolean shorthand multi_agent_v2 = true #when forcing di"",].join("\n");- const result = forceDisableMultiAgentV2(config);+ const result = forceDisableMultiAgentV2(config, { multiAgentVersion: null });assert.doesNotMatch(result, /^multi_agent_v2\s*=/m);assert.match(result, /\[features\.multi_agent_v2\]\nenabled = false\n/);@@ -557,7 +557,7 @@ test("#given multi_agent_v2 enabled #when forcing disable #then annotates the ma"",].join("\n");- const result = forceDisableMultiAgentV2(config);+ const result = forceDisableMultiAgentV2(config, { multiAgentVersion: null });assert.match(result, /openai\/codex#26753/);assert.match(result, /LAZYCODEX_CONFIG_MIGRATION_DISABLED=1/);@@ -567,7 +567,7 @@ test("#given multi_agent_v2 enabled #when forcing disable #then annotates the matest("#given no multi_agent_v2 section #when forcing disable #then annotates the appended section", () => {const config = ['model = "gpt-5.5"', ""].join("\n");- const result = forceDisableMultiAgentV2(config);+ const result = forceDisableMultiAgentV2(config, { multiAgentVersion: null });assert.match(result, /openai\/codex#26753/);assert.match(result, /^#[^\n]*\n(?:#[^\n]*\n)*\[features\.multi_agent_v2\]\nenabled = false\n/m);@@ -576,8 +576,8 @@ test("#given no multi_agent_v2 section #when forcing disable #then annotates thetest("#given an annotated managed section #when forcing disable runs again #then does not duplicate the comment", () => {const config = ['model = "gpt-5.5"', "", "[features.multi_agent_v2]", "enabled = true", ""].join("\n");- const annotated = forceDisableMultiAgentV2(config);- const rerun = forceDisableMultiAgentV2(`${annotated.replace("enabled = false", "enabled = true")}`);+ const annotated = forceDisableMultiAgentV2(config, { multiAgentVersion: null });+ const rerun = forceDisableMultiAgentV2(`${annotated.replace("enabled = false", "enabled = true")}`, { multiAgentVersion: null });const markers = rerun.match(/openai\/codex#26753/g) ?? [];assert.equal(markers.length, 1);@@ -594,7 +594,7 @@ test("#given [features] boolean shorthand multi_agent_v2 = false #when forcing d"",].join("\n");- const result = forceDisableMultiAgentV2(config);+ const result = forceDisableMultiAgentV2(config, { multiAgentVersion: null });const parsed = parseTomlWithPython(result);assert.doesNotMatch(result, /^\s*multi_agent_v2\s*=/m);@@ -614,7 +614,7 @@ test("#given multi_agent_v2 already disabled #when forcing disable #then returns"",].join("\n");- const result = forceDisableMultiAgentV2(config);+ const result = forceDisableMultiAgentV2(config, { multiAgentVersion: null });assert.equal(result, config);});@@ -756,7 +756,7 @@ test("#given global config with forced multi_agent_v2 #when full migration runstest("#given enabled = true with an inline comment #when forcing disable #then flips to false and preserves the comment", () => {const config = ["[features.multi_agent_v2]", "enabled = true # tuned by me", ""].join("\n");- const result = forceDisableMultiAgentV2(config);+ const result = forceDisableMultiAgentV2(config, { multiAgentVersion: null });assert.match(result, /^enabled = false # tuned by me$/m);assert.doesNotMatch(result, /enabled = true/);@@ -767,7 +767,7 @@ test("#given enabled = true with an inline comment #when forcing disable #then ftest("#given a section header with an inline comment #when forcing disable #then patches in place without duplicating the table", () => {const config = ["[features.multi_agent_v2] # pinned by me", "enabled = true", ""].join("\n");- const result = forceDisableMultiAgentV2(config);+ const result = forceDisableMultiAgentV2(config, { multiAgentVersion: null });assert.equal((result.match(/\[features\.multi_agent_v2\]/g) ?? []).length, 1);assert.match(result, /enabled = false/);@@ -779,19 +779,19 @@ test("#given an already-guarded commented config #when re-running #then output iconst configA = ["[features.multi_agent_v2]", "enabled = true # tuned by me", ""].join("\n");const configB = ["[features.multi_agent_v2] # pinned by me", "enabled = true", ""].join("\n");- const firstA = forceDisableMultiAgentV2(configA);- const rerunA = forceDisableMultiAgentV2(firstA);+ const firstA = forceDisableMultiAgentV2(configA, { multiAgentVersion: null });+ const rerunA = forceDisableMultiAgentV2(firstA, { multiAgentVersion: null });assert.equal(rerunA, firstA);- const firstB = forceDisableMultiAgentV2(configB);- const rerunB = forceDisableMultiAgentV2(firstB);+ const firstB = forceDisableMultiAgentV2(configB, { multiAgentVersion: null });+ const rerunB = forceDisableMultiAgentV2(firstB, { multiAgentVersion: null });assert.equal(rerunB, firstB);});test("#given user-disabled with an inline comment #when forcing disable #then returns config unchanged", () => {const config = ["[features.multi_agent_v2]", "enabled = false # I turned this off myself", ""].join("\n");- const result = forceDisableMultiAgentV2(config);+ const result = forceDisableMultiAgentV2(config, { multiAgentVersion: null });assert.equal(result, config);});@@ -799,7 +799,7 @@ test("#given user-disabled with an inline comment #when forcing disable #then retest("#given [features] shorthand true with an inline comment #when forcing disable #then removes the shorthand and appends one disabled table", () => {const config = ["[features]", "plugins = true", "multi_agent_v2 = true # legacy", ""].join("\n");- const result = forceDisableMultiAgentV2(config);+ const result = forceDisableMultiAgentV2(config, { multiAgentVersion: null });assert.doesNotMatch(result, /^\s*multi_agent_v2\s*=/m);assert.equal((result.match(/\[features\.multi_agent_v2\]/g) ?? []).length, 1);@@ -816,12 +816,268 @@ test("#given a following section header with an inline comment #when inserting e"",].join("\n");- const result = forceDisableMultiAgentV2(config);+ const result = forceDisableMultiAgentV2(config, { multiAgentVersion: null });assert.match(result, /\[features\.multi_agent_v2\]\nenabled = false\n/);assert.match(result, /\[mcp_servers\.x\][^\n]*\nenabled = true/);});+test("#given gpt-5.6-terra with managed disable #when model catalog prefers v2 #then clears enabled=false and managed comments", () => {+ const config = [+ 'model = "gpt-5.6-terra"',+ "",+ "# Managed by LazyCodex: multi_agent_v2 is re-disabled on every Codex session start",+ "# because enabling it fails every turn with HTTP 400 (openai/codex#26753).",+ "# Opt out: LAZYCODEX_CONFIG_MIGRATION_DISABLED=1 (or OMO_CODEX_CONFIG_MIGRATION_DISABLED=1).",+ "",+ "[features.multi_agent_v2]",+ "enabled = false",+ "max_concurrent_threads_per_session = 1000",+ "",+ ].join("\n");++ const result = forceDisableMultiAgentV2(config, { multiAgentVersion: "v2" });++ assert.doesNotMatch(result, /^\s*enabled\s*=\s*false/m);+ assert.doesNotMatch(result, /openai\/codex#26753/);+ assert.doesNotMatch(result, /Managed by LazyCodex: multi_agent_v2/);+ assert.match(result, /\[features\.multi_agent_v2\]/);+ assert.match(result, /max_concurrent_threads_per_session = 1000/);+});++test("#given gpt-5.6 v2 model with hide_spawn_agent_metadata=false #when clearing #then removes the stale metadata override", () => {+ const config = [+ 'model = "gpt-5.6-sol"',+ "",+ "[features.multi_agent_v2]",+ "enabled = false",+ "hide_spawn_agent_metadata = false",+ "max_concurrent_threads_per_session = 1000",+ "",+ ].join("\n");++ const result = forceDisableMultiAgentV2(config, { multiAgentVersion: "v2" });++ assert.doesNotMatch(result, /^\s*enabled\s*=\s*false/m);+ assert.doesNotMatch(result, /^\s*hide_spawn_agent_metadata\s*=/m);+ assert.match(result, /max_concurrent_threads_per_session = 1000/);+});++test("#given gpt-5.6 v2 model with hide_spawn_agent_metadata=true #when clearing #then leaves the default-matching value alone", () => {+ const config = [+ 'model = "gpt-5.6-sol"',+ "",+ "[features.multi_agent_v2]",+ "enabled = false",+ "hide_spawn_agent_metadata = true",+ "max_concurrent_threads_per_session = 1000",+ "",+ ].join("\n");++ const result = forceDisableMultiAgentV2(config, { multiAgentVersion: "v2" });++ assert.doesNotMatch(result, /^\s*enabled\s*=\s*false/m);+ assert.match(result, /hide_spawn_agent_metadata = true/);+});++test("#given v1 model with hide_spawn_agent_metadata=false #when forcing disable #then keeps the metadata override", () => {+ const config = [+ 'model = "gpt-5.5"',+ "",+ "[features.multi_agent_v2]",+ "hide_spawn_agent_metadata = false",+ "max_concurrent_threads_per_session = 1000",+ "",+ ].join("\n");++ const result = forceDisableMultiAgentV2(config, { multiAgentVersion: "v1" });++ assert.match(result, /hide_spawn_agent_metadata = false/);+ assert.match(result, /enabled = false/);+});++test("#given gpt-5.6-sol with no multi_agent_v2 section #when model catalog prefers v2 #then does not append a disable", () => {+ const config = ['model = "gpt-5.6-sol"', "", "[features]", "plugins = true", ""].join("\n");++ const result = forceDisableMultiAgentV2(config, { multiAgentVersion: "v2" });++ assert.doesNotMatch(result, /\[features\.multi_agent_v2\]/);+ assert.doesNotMatch(result, /enabled = false/);+ assert.match(result, /plugins = true/);+});++test("#given gpt-5.6-terra managed disable #when full migration sees models_cache v2 #then clears disable and drops agents.max_threads", async () => {+ const root = await mkdtemp(join(tmpdir(), "lazycodex-multi-agent-v2-gpt56-"));+ const codexHome = join(root, "codex-home");+ await mkdir(codexHome, { recursive: true });+ const configPath = join(codexHome, "config.toml");+ await writeFile(+ configPath,+ [+ 'model = "gpt-5.6-terra"',+ 'model_reasoning_effort = "xhigh"',+ "",+ "# Managed by LazyCodex: multi_agent_v2 is re-disabled on every Codex session start",+ "# because enabling it fails every turn with HTTP 400 (openai/codex#26753).",+ "",+ "[agents]",+ "max_threads = 1000",+ "max_depth = 2",+ "",+ "[features.multi_agent_v2]",+ "enabled = false",+ "max_concurrent_threads_per_session = 1000",+ "",+ ].join("\n"),+ );+ await writeFile(+ join(codexHome, "models_cache.json"),+ JSON.stringify({+ models: [{ slug: "gpt-5.6-terra", multi_agent_version: "v2" }],+ }),+ );++ const result = await migrateCodexConfig({+ env: { CODEX_HOME: codexHome, LAZYCODEX_MODEL_CATALOG_STATE_PATH: join(root, "model-state.json") },+ cwd: root,+ });++ assert.deepEqual(result.changed, [configPath]);+ const content = await readFile(configPath, "utf8");+ assert.doesNotMatch(content, /^\s*enabled\s*=\s*false/m);+ assert.doesNotMatch(content, /openai\/codex#26753/);+ assert.doesNotMatch(content, /^\s*max_threads\s*=/m);+ assert.match(content, /max_depth = 2/);+ assert.match(content, /max_concurrent_threads_per_session = 1000/);+});++test("#given config default gpt-5.5 #when SessionStart model is gpt-5.6-terra #then prefers session model and clears disable", () => {+ const config = [+ 'model = "gpt-5.5"',+ "",+ "[features.multi_agent_v2]",+ "enabled = false",+ "max_concurrent_threads_per_session = 1000",+ "",+ ].join("\n");++ const result = forceDisableMultiAgentV2(config, {+ sessionModel: "gpt-5.6-terra",+ multiAgentVersion: "v2",+ });++ assert.doesNotMatch(result, /^\s*enabled\s*=\s*false/m);+ assert.match(result, /max_concurrent_threads_per_session = 1000/);+});++test("#given SessionStart without model #when requireSessionModel is set #then skips legacy force-disable", () => {+ const config = ['model = "gpt-5.5"', "", "[features]", "plugins = true", ""].join("\n");++ const result = forceDisableMultiAgentV2(config, {+ multiAgentVersion: null,+ requireSessionModel: true,+ sessionModel: null,+ });++ assert.equal(result, config);+ assert.doesNotMatch(result, /\[features\.multi_agent_v2\]/);+});++test("#given legacy [features] shorthand #when requireSessionModel skips force-disable #then still removes the shorthand", () => {+ const config = ['model = "gpt-5.5"', "", "[features]", "plugins = true", "multi_agent_v2 = true", ""].join("\n");++ const result = forceDisableMultiAgentV2(config, {+ multiAgentVersion: null,+ requireSessionModel: true,+ sessionModel: null,+ });++ assert.doesNotMatch(result, /^\s*multi_agent_v2\s*=/m);+ assert.match(result, /plugins = true/);+ assert.doesNotMatch(result, /\[features\.multi_agent_v2\]/);+});++test("#given legacy [features] shorthand #when session model has no catalog entry #then still removes the shorthand", () => {+ const config = ['model = "gpt-5.5"', "", "[features]", "multi_agent_v2 = false", ""].join("\n");++ const result = forceDisableMultiAgentV2(config, {+ multiAgentVersion: null,+ sessionModel: "gpt-5.7-nova",+ });++ assert.doesNotMatch(result, /^\s*multi_agent_v2\s*=/m);+ assert.doesNotMatch(result, /\[features\.multi_agent_v2\]/);+});++test("#given legacy shorthand and no session model on hook path #when full migration runs #then output stays valid TOML", async () => {+ const root = await mkdtemp(join(tmpdir(), "lazycodex-multi-agent-v2-shorthand-hook-"));+ const codexHome = join(root, "codex-home");+ await mkdir(codexHome, { recursive: true });+ const configPath = join(codexHome, "config.toml");+ await writeFile(+ configPath,+ ['model = "gpt-5.5"', 'model_reasoning_effort = "high"', "", "[features]", "plugins = true", "multi_agent_v2 = true", ""].join("\n"),+ );++ await migrateCodexConfig({+ env: { CODEX_HOME: codexHome, LAZYCODEX_MODEL_CATALOG_STATE_PATH: join(root, "model-state.json") },+ cwd: root,+ sessionModel: null,+ requireSessionModel: true,+ });++ const content = await readFile(configPath, "utf8");+ const parsed = parseTomlWithPython(content);+ assert.doesNotMatch(content, /^\s*multi_agent_v2\s*=\s*(?:true|false)/m);+ assert.equal(parsed.features.plugins, true);+ assert.equal(parsed.features.multi_agent_v2.max_concurrent_threads_per_session, 1000);+ assert.equal("enabled" in parsed.features.multi_agent_v2, false);+});++test("#given config default gpt-5.5 #when full migration gets SessionStart gpt-5.6-terra #then clears disable using session model", async () => {+ const root = await mkdtemp(join(tmpdir(), "lazycodex-multi-agent-v2-session-model-"));+ const codexHome = join(root, "codex-home");+ await mkdir(codexHome, { recursive: true });+ const configPath = join(codexHome, "config.toml");+ await writeFile(+ configPath,+ [+ 'model = "gpt-5.5"',+ 'model_reasoning_effort = "high"',+ "",+ "[agents]",+ "max_threads = 1000",+ "",+ "[features.multi_agent_v2]",+ "enabled = false",+ "max_concurrent_threads_per_session = 1000",+ "",+ ].join("\n"),+ );+ await writeFile(+ join(codexHome, "models_cache.json"),+ JSON.stringify({+ models: [+ { slug: "gpt-5.5", multi_agent_version: "v1" },+ { slug: "gpt-5.6-terra", multi_agent_version: "v2" },+ ],+ }),+ );++ const result = await migrateCodexConfig({+ env: { CODEX_HOME: codexHome, LAZYCODEX_MODEL_CATALOG_STATE_PATH: join(root, "model-state.json") },+ cwd: root,+ sessionModel: "gpt-5.6-terra",+ requireSessionModel: true,+ });++ assert.deepEqual(result.changed, [configPath]);+ const content = await readFile(configPath, "utf8");+ assert.doesNotMatch(content, /^\s*enabled\s*=\s*false/m);+ assert.doesNotMatch(content, /^\s*max_threads\s*=/m);+ assert.match(content, /max_concurrent_threads_per_session = 1000/);+});+async function canCreateSymlink(type) {const root = await mkdtemp(join(tmpdir(), "lazycodex-symlink-capability-"));const target = join(root, "target");diff --git a/plugins/omo/test/subagent-limit-migration.test.mjs b/plugins/omo/test/subagent-limit-migration.test.mjsindex a8c5535a..22395551 100644--- a/plugins/omo/test/subagent-limit-migration.test.mjs+++ b/plugins/omo/test/subagent-limit-migration.test.mjs@@ -42,3 +42,36 @@ test("#given SessionStart config migration sees a low subagent cap #when migratiassert.match(content, /max_concurrent_threads_per_session = 1000/);assert.doesNotMatch(content, /^max_threads\s*=\s*6$/m);});++test("#given gpt-5.6 session model with no models_cache #when migrating #then does not write agents.max_threads", async () => {+ const root = await mkdtemp(join(tmpdir(), "lazycodex-subagent-limit-gpt56-nocache-"));+ const configPath = join(root, "config.toml");+ await writeFile(+ configPath,+ [+ 'model = "gpt-5.6-sol"',+ 'model_reasoning_effort = "xhigh"',+ "",+ "[agents]",+ "max_threads = 1000",+ "max_depth = 4",+ "",+ "[features.multi_agent_v2]",+ "enabled = false",+ "max_concurrent_threads_per_session = 1000",+ "",+ ].join("\n"),+ );++ const result = await migrateConfigFile(configPath, {+ env: { CODEX_HOME: root },+ sessionModel: "gpt-5.6-sol",+ });++ const content = await readFile(configPath, "utf8");+ assert.equal(result.changed, true);+ assert.doesNotMatch(content, /^\s*max_threads\s*=/m);+ assert.doesNotMatch(content, /^\s*enabled\s*=\s*false/m);+ assert.match(content, /max_depth = 4/);+ assert.match(content, /max_concurrent_threads_per_session = 1000/);+});diff --git a/plugins/omo/test/sync-skills-orchestration.test.mjs b/plugins/omo/test/sync-skills-orchestration.test.mjsindex ce225bca..88e54ca8 100644--- a/plugins/omo/test/sync-skills-orchestration.test.mjs+++ b/plugins/omo/test/sync-skills-orchestration.test.mjs@@ -29,7 +29,7 @@ function patternFromParts(parts, flags) {}const multiAgentV2RoleGuidance =- "On `multi_agent_v2` sessions the same `agent_type` applies (the OMO installer exposes it) with `fork_turns` instead of `fork_context`.";+ "If instead a flat `spawn_agent` with a required `task_name` exists (`multi_agent_v2`), rewrite every `multi_agent_v1.*` example:";const loadSkillsGuidance ="When translating `load_skills=[...]`, include the requested skill names in the spawned agent's `message`.";@@ -148,7 +148,9 @@ call_omo_agent(subagent_type="explore", prompt="inspect")assert.match(adapted, /fork_context":false/);assert.match(adapted, /"agent_type":"explorer"/);assert.match(adapted, /multi_agent_v1\.wait_agent/);- assert.doesNotMatch(adapted, /task_name/);+ assert.match(adapted, /"task_name":"<lowercase_digits_underscores>"/);+ assert.match(adapted, /fork_turns/);+ assert.doesNotMatch(adapted, /\| `spawn_agent\({"task_name"/);assert.doesNotMatch(adapted, /Obsolete generated compatibility prose/);});