Bug: spawn_agent v2 exposes parameter task_name but validation error refers to nonexistent parameter agent_name
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 85/100
Hướng nghiên cứu
Bắt đầu với codex-rs/core/src/tools/handlers/multi_agents_spec.rs để xác nhận rằng lược đồ spawn_agent v2 hiển thị task_name, sau đó kiểm tra codex-rs/protocol/src/agent_path.rs để tìm thông báo xác thực được hardcode. Tái hiện sự không khớp bằng codex exec --json và một lệnh gọi spawn_agent của MultiAgentV2 sử dụng task_name. Thay đổi chính được hoàn tất khi lỗi xác thực nhắc đến task_name nhất quán với lược đồ; thêm mẫu JSON Schema tùy chọn sẽ cho thấy cùng ràng buộc đó sớm hơn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Rust
- Star
- 136k
- Fork
- 21.6k
- Merge trung bình
- 1 phút
- Pull request đã merge (30 ngày)
- 999
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của openai/codex
-
bug CLI exec subagent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug CLI subagent
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug: codex exec --json silently drops SendMessage, FollowupTask, InterruptAgent, and ListAgents collab_tool_call itemsCó thể đã có người làm @akhil9tiet đã nhận hôm nay. Đang mởbug CLI exec subagent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
openai/codex#64533 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
WebSocket client ignores x-codex-turn-state in codex.response.metadataCó thể đã có người làm @akhil9tiet đã nhận hôm nay. Đang mởbug CLI connectivity
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
openai/codex#64479 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug CLI
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
nightly-cleanup
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
max-sixty/worktrunk#4939 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Flaky Test] tests::signer::v0::miner_recovers_when_broadcast_block_delay_across_tenures_occursĐang mởflaky
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
stacks-network/stacks-core#7918 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
New Mutants FoundĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
rust-bitcoin/rust-bech32#339 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
databendlabs/openraft#2554 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
autofixer: follow-up
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
tursodatabase/turso#12683 ·
Maintainer thường phản hồi trong vòng 1 ngày