Bug: spawn_agent v2 exposes parameter task_name but validation error refers to nonexistent parameter agent_name
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
codex-rs/core/src/tools/handlers/multi_agents_spec.rs から始め、spawn_agent v2 スキーマが task_name を公開していることを確認します。次に、codex-rs/protocol/src/agent_path.rs を調査して、ハードコードされた検証メッセージを確認します。codex exec --json と、task_name を使用した MultiAgentV2 の spawn_agent 呼び出しで不一致を再現します。主要な変更は、検証エラーがスキーマと整合して task_name を名乗る時点で完了となります。任意の JSON Schema パターンを追加すると、同じ制約を早い段階で公開できます。
索引モデルが issue の本文から書いたものです。
説明
Version / Commit
- Observed in:
codex-cli 0.172.0(codex exec --json) - Verified on
main(065e18b)
Summary
In MultiAgentV2, spawn_agent exposes its required naming parameter to the model as task_name, but when a model passes an invalid value (such as a hyphenated name like "ledger-audit"), the validation error returned to the model cites agent_name ("agent_name must use only lowercase letters, digits, and underscores") — a parameter name that does not exist in the spawn_agent v2 tool schema.
Source Location (main @ 065e18b)
- Tool schema names the parameter
task_name—codex-rs/core/src/tools/handlers/multi_agents_spec.rs:139-144&163:properties.insert( "task_name".to_string(), JsonSchema::string(Some( "Task name for the new agent. Use lowercase letters, digits, and underscores." .to_string(), )), ); ... Some(vec!["task_name".to_string(), "message".to_string()]), - Validation error hardcodes
agent_name—codex-rs/protocol/src/agent_path.rs:143and229:Err("agent_name must use only lowercase letters, digits, and underscores".to_string())
Reproduction
- Run a MultiAgentV2 session where the model invokes
spawn_agentwith{"task_name": "ledger-audit", "message": "..."}. - Observe the tool error returned to the model:
The model is told to fixagent_name must use only lowercase letters, digits, and underscoresagent_name, even though its tool call schema only hastask_name.
(Reproduced during TraceTrial-Bench Core-95 evaluation on L4-pending-child-at-exit-001 with [email protected].)
Expected Behavior
- Report the actual schema parameter name (
task_name) inspawn_agentv2 validation errors (e.g.,"task_name must use only lowercase letters, digits, and underscores"). - Optionally add
"pattern": "^[a-z0-9_]+$"to thetask_nameJSON Schema property so models see the machine-readable constraint up front.
- 主要言語
- Rust
- スター
- 136k
- フォーク
- 21.6k
- 平均マージ
- 1分
- マージ済み PR(30日)
- 999
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
openai/codex のほかの issue
-
bug CLI exec subagent
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug CLI subagent
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
Bug: codex exec --json silently drops SendMessage, FollowupTask, InterruptAgent, and ListAgents collab_tool_call items対応中かも @akhil9tiet が今日担当しました。 オープンbug CLI exec subagent
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
openai/codex#64533 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
WebSocket client ignores x-codex-turn-state in codex.response.metadata対応中かも @akhil9tiet が今日担当しました。 オープンbug CLI connectivity
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
openai/codex#64479 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug CLI
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
nightly-cleanup
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
max-sixty/worktrunk#4939 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Flaky Test] tests::signer::v0::miner_recovers_when_broadcast_block_delay_across_tenures_occursオープンflaky
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
stacks-network/stacks-core#7918 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
New Mutants Foundオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
rust-bitcoin/rust-bech32#339 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
databendlabs/openraft#2554 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
autofixer: follow-up
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
tursodatabase/turso#12683 ·
メンテナーはふだん 1 日以内に返信