Skip to content

feat(codex): allow editing multi_agent_version per model in the catalog editor - #753

Merged
lzt404 merged 2 commits into
router-for-me:devfrom
Gor4:feat/codex-catalog-multi-agent-version
Dec 4, 2026
Merged

lzt404 merged 2 commits into
router-for-me:devfrom
Gor4:feat/codex-catalog-multi-agent-version

Conversation

@Gor4

@Gor4 Gor4 commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Problem

In the tested Codex Desktop v2 runtime (0.173.0-alpha.4.1), a subagent's model must advertise multi_agent_version: "v2" in the model catalog to receive native collaboration tools (spawn_agent, send_message, followup_task, wait_agent, list_agents).

  • Root chats skip this model check.
  • Codex configuration can still disable individual tools.
  • The public 0.173.0-alpha.4 tag shows this gate. In stable 0.174.0, either v2 or v3 satisfies it.
  • The v1 runtime uses a separate depth check instead.

References: 0.173.0-alpha.4 gate · 0.174.0 gate · 0.174.0 enum

ECPA writes every model without a matching official template (Claude, Gemini, DeepSeek, …) with multi_agent_version: null (normalize_fallback_model), and the catalog editor can't change it. A multi_agent_version entry in model-customizations.json is rejected with Model field multi_agent_version cannot be modified.

In the tested setup, subagents on those models therefore received none of these tools and couldn't message their parent. #519 ran into the same field restriction; it also asked for other fields, which this PR doesn't cover.

Change

  • multi_agent_version is now an editable catalog field. It's opt-in and defaults are unchanged: official templates keep their own value, and models without a matching official template keep an explicit null.

  • Editor: a dropdown next to "Default reasoning level".

    • Options: "Let the client decide" (null), v3, v2, v1 and "Disabled".
    • A value a template or saved override already has outside that list, such as v9, stays visible and selectable.
    • The dropdown and its hint are hidden when the backend's snapshot doesn't include the field. This happens with the headless WebUI when a newer frontend runs against an older ecpa-web (--static-dir).
  • Validation accepts null, disabled, or v followed by one to three ASCII digits.

    • An inherited value in that format, such as v9, survives unrelated edits. Other values, such as v1000, are rejected.
    • Codex 0.173.0-alpha.4.1 (Desktop) and 0.174.0 treat a version string they don't recognise as unset. This was checked by loading catalogs containing v3 and an invented version. Decoder test
  • Translations: strings for zh-CN, en, ja, ru and pt-BR; zh-TW is generated as usual.

  • Main chats: this is why the setting is opt-in.

    • When agents are enabled and Codex's multi_agent_v2 feature is off, a model's explicit version selects the multi-agent mode for main chats on that model.
    • With agents disabled and the feature off, the multi-agent runtime is disabled.
    • With the feature on, the checked 0.173.0-alpha.4 selects v2, and stable 0.174.0 honours a supported v3 and otherwise uses v2.

    References: 0.173.0-alpha.4 precedence · 0.174.0 precedence

Downgrade note

An older ECPA rejects the whole customization file if any model in it has a multi_agent_version override. It logs the error and starts with default settings. Its next save then overwrites the file, losing the other model overrides, the model order and the review-model choice.

Before downgrading, do one of these:

  • Edit the file. Back up codex_models/model-customizations.json in the app data folder, then remove only the multi_agent_version key from every saved model entry. Use this for models that are no longer listed.
  • Use the editor. In this version's editor, set each affected model back to its template value and save. Two things to watch:
    • "Let the client decide" saves an explicit null, which is itself an override when the template value is v2.
    • The "Use defaults" button resets every field of every listed model, not just this one.

Testing

Automated checks ran on this PR's tree on dev base 2592639, with the base alone as the comparison.

  • Rust: cargo test -p ecpa-usage --lib codex_catalog passes 54 tests (50 on the base). The 4 new tests check that:
    • an override survives catalog regeneration and reloading, and a reset removes it and restores the explicit null;
    • the accepted and rejected values work as described, and every bundled template value passes;
    • an inherited v3 or v9 template value, with an existing override on that model, doesn't block editing another model (this test fails with a fixed disabled / v1 / v2 list);
    • an official model emits the v2 override in the generated catalog, and a reset restores the template's absent field or explicit null exactly.
  • Frontend: bun test tests/codexModelCatalog.test.ts passes 9 tests (7 on the base). bun run check passes, and node tests/codex-model-order-ui.cjs passes.
  • Browser checks against the mock backend:
    • In zh-CN and en (known values): labels, hint and option order are correct; changing the value enables Save and sends all 14 fields; the value persists after reopening; the "Let the client decide" option sends null; the "Use defaults" button restores the template's v2.
    • In en only: future values (template v9, saved v8) stay selectable, with no duplicate options; an older-backend snapshot hides the control, and an unrelated edit sends 13 fields.
    • Screenshots are in the Screenshots section below.
  • Manual check in Codex Desktop 0.173.0-alpha.4.1: with "multi_agent_version": "v2" set by hand in the generated catalog for claude-opus-5-5, an Opus subagent received the collaboration tools and delivered send_message to its parent. Before, it had none. This used a hand-edited catalog, not a build of this branch, and the packaged app wasn't built.
  • Failures that already exist on dev 2592639 are unchanged with this PR: 3 in tests/i18n.test.ts, 3 in the ecpa-usage usage-database tests, and 2 in tests/browserMockRuntime.test.ts.

Screenshots

Catalog editor with the new dropdown (mock backend), English and zh-CN:

Multi-agent version dropdown, English

Multi-agent version dropdown, zh-CN

Refs #519

Gor4 and others added 2 commits December 4, 2026 08:46
…og editor

In the tested Codex Desktop v2 runtime (0.173.0-alpha.4.1), a subagent's model must have multi_agent_version v2 in the catalog to receive native collaboration tools such as send_message. Root chats skip this model check. ECPA writes models without a matching official template with null, and the catalog editor rejected the field, so subagents on those models could not message other agents.

Make multi_agent_version editable per model. The editor offers v3, v2, v1 and disabled, keeps any other inherited or saved value visible, and hides the control when an older backend omits the field. Validation accepts null, disabled, or v followed by one to three ASCII digits, so an inherited value such as v9 survives unrelated edits. Defaults are unchanged.
@lzt404
lzt404 merged commit 5225e4a into router-for-me:dev Dec 4, 2026
@Gor4
Gor4 deleted the feat/codex-catalog-multi-agent-version branch December 4, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants