[Feature] Per-model V1/V2 subagent mode selection (including V2 Plaintext)

オープン
#8,953 コメント 3 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
42/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript

調査の方向性

Start by reading the multi-agent mode configuration and routed task delivery paths, especially the V2 Plaintext compiler for the canonical ChatGPT route. Check whether provider identity is available when selecting a parent model and constructing subagent tasks. Done means compatible third-party parents can use readable V2 tasks, or per-model mode overrides select V1/V2/V2 Plaintext for new conversations without changing existing ones; the issue does not name specific files or tests.

索引モデルが issue の本文から書いたものです。

説明

enhancement proxy
Area

Proxy and routing

What are you trying to accomplish?

I want to choose the multi-agent collaboration mode per model, instead of applying one global V1/V2 mode to every model in Codex Desktop.

My preferred setup is:

  • Native ChatGPT GPT models: v2-plaintext, so they can delegate readable tasks to routed subagents.
  • opencode-go/deepseek-v4.1-flash: v2, since I tested it as a V2 parent and it can spawn working V2 subagents.
  • ZQ/gpt-6.2-sol: v1 as a compatibility fallback, because V2 delegation currently fails for me.

Ideally, the mode would be selected automatically when I choose a parent model for a new conversation. I would also like to know whether individual subagent models can be configured separately (for example, one model uses V1 and another uses V2), rather than being forced to use the same collaboration mode globally.

I want to retain V2 where it actually works, without repeatedly changing the global mode to accommodate an incompatible provider.

What prevents this today?

I'm using OpenCodex 2.100.5 with Codex Desktop. I have enabled multiAgentMode: "v2-plaintext".

I tested three scenarios:

  1. Native GPT parent → DeepSeek V2 child: Works. Both spawn_agent and followup_task successfully deliver readable tasks to opencode-go/deepseek-v4.1-flash.
  2. DeepSeek parent → V2 subagents: Also works. I tested opencode-go/deepseek-v4.1-flash as the parent and it was able to spawn and use V2 subagents successfully.
  3. Third-party GPT parent → DeepSeek V2 child: With ZQ/gpt-6.2-sol (using the openai-responses adapter) as the parent, V2 child creation fails in practice. The child reports: Routed V2 worker task is encrypted for the native ChatGPT backend and cannot be read by the selected provider. The parent reports unreadable_encrypted_agent_task; sometimes the child conversation fails to load at all. This still happens with V2 Plaintext enabled, as shown in the attached screenshot.

I understand the documented plaintext compiler only applies to the canonical ChatGPT forward route, not arbitrary third-party Responses providers. I have not verified where the encrypted payload originates.

Questions:

  • Is it expected that v2-plaintext does not rewrite tasks for a third-party GPT parent using openai-responses?
  • Is there a way to fix this specific routed-GPT-parent failure while keeping working third-party V2 parents such as DeepSeek on V2?
  • If not, can OpenCodex let users assign V1/V2 modes per model, instead of forcing a global choice?
What should OpenCodex do?

Ideally, please investigate whether compatible third-party GPT providers can participate in readable V2 delegation, while preserving the current canonical-ChatGPT plaintext path.

Regardless of whether that is possible, I would like a configurable per-model collaboration mode:

  • Allow an explicit v1, v2, or v2-plaintext choice for eligible models, with a global default for models without an override.
  • When starting a new conversation, use the selected parent model's configured mode automatically.
  • Keep DeepSeek on V2 when it works; use V1 only for specific incompatible models such as my routed ZQ/gpt-6.2-sol.
  • Do not silently change existing conversations or forward encrypted tasks to providers unable to read them.

Additional question about subagent configuration: Could the mode also be configured per subagent model in the subagent roster (e.g. model A uses V1, model B uses V2)? If mixing V1 and V2 subagents within one parent session is not supported by Codex's collaboration protocol, could you clarify that limitation and support per-parent-model modes for new sessions as a first step?

The exact implementation/configuration interface is flexible.

Example usage or interface

An illustrative configuration could look like this:

{
  "multiAgentMode": "v2",
  "multiAgentModeByModel": {
    "gpt-6.2-sol": "v2-plaintext",
    "ZQ/gpt-6.2-sol": "v1",
    "opencode-go/deepseek-v4.1-flash": "v2"
  }
}

This is proposed syntax, not an existing OpenCodex configuration option.

Expected behavior when starting new parent sessions:

  1. Select native gpt-6.2-sol → use V2 Plaintext; routed DeepSeek child tasks remain readable.
  2. Select opencode-go/deepseek-v4.1-flash → use V2; it can spawn V2 subagents.
  3. Select ZQ/gpt-6.2-sol → automatically use V1, avoiding the failing V2 task-delivery path.
  4. No manual global-mode toggling or restart just to switch models.

If supported, I would also appreciate individual subagent-model V1/V2 settings in the subagent configuration UI. If not, per-parent-model selection alone would already solve my main workflow issue.

Alternatives or workarounds
  • Global V1: Avoids some V2 incompatibilities, but unnecessarily gives up working V2 flows for native GPT and DeepSeek.
  • Global V2 Plaintext: Native GPT → DeepSeek works, and DeepSeek can also act as a V2 parent, but ZQ/gpt-6.2-sol still fails as a V2 parent.
  • Manually change the global mode: Possible, but inconvenient when switching between models.
  • Separate OpenCodex configurations/instances: More complicated than a per-model setting.

I am aware of the experimental agentTaskRecovery mechanism, but it does not appear to be a general fix for arbitrary third-party parent models.

Additional context

Environment

  • OpenCodex: 2.100.5
  • Client: Codex Desktop
  • Tested global mode: v2-plaintext
  • Native parent: gpt-6.2-sol (ChatGPT OAuth)
  • Third-party GPT parent that fails: ZQ/gpt-6.2-sol (openai-responses)
  • Third-party V2 parent that works: opencode-go/deepseek-v4.1-flash
  • Confirmed working third-party V2 child: opencode-go/deepseek-v4.1-flash

Related issues and implementation

I'm happy to provide sanitized request logs and further reproduction details if needed.

image image
Checks
  • I searched existing issues and documentation.
  • This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
  • I removed secrets and personal data.
主要言語
TypeScript
スター
16.9k
フォーク
1.3k
平均マージ
1日 4時間
マージ済み PR(30日)
814

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

lidge-jun/opencodex のほかの issue

lidge-jun/opencodex の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。