mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4210] [Engine] serve: /v1/responses accepts Codex's agent_message input items (multi-agent v2 workers) #4951
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4951
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/4210
Author: @wyxu95
Created: 10/26/2026
Status: 🔄 Open
Base:
main← Head:responses-agent-message📝 Commits (1)
a00a4beserve: /v1/responses reads Codex's agent_message input items (multi-agent v2: a worker's task and its answer) as user messages instead of refusing them with a 400; test📊 Changes
3 files changed (+34 additions, -1 deletions)
View changed files
📝
docs/DETAILS.md(+1 -1)📝
serve/responses.py(+15 -0)📝
serve/test_responses.py(+18 -0)📄 Description
Draft: the end-to-end run used the older revision
7dd5cf1with this patch, and only one model family (see Validation).Problem and result
Codex's multi-agent v2 sends the task the parent agent gives a worker, and the worker's answer, as
agent_messageinput items on
/v1/responses. Strata refused them, so every worker request failed:with this error.
Approach
An
agent_messageitem becomes a user message. Its content is aninput_textheader that Codex writes(
Message Type: NEW_TASK,Task name,Sender,Payload:) and, for a task, anencrypted_contentpart with thepayload. When the agents run on this server, that part holds the task as plain text, so it is read as text. Other
input items and the requests without
agent_messageitems are rendered as before.docs/DETAILS.mdlists the newitem type.
Validation
Passed:
python -m unittest serve.test_responsesata00a4be(this branch, on4b9e05a): 42 tests, OK (1 skipped). The newtest
test_agent_messages_become_user_messagescovers a worker's task (withencrypted_content) and a worker'sanswer after a
spawn_agentcall.7dd5cf1with this patch(
serve/responses.pyandserve/test_responses.pyare the same at7dd5cf1and4b9e05a): Codex Security CLI 0.6.0with its bundled Codex CLI 0.163.0, a standard scan of a small Flask repository, multi-agent v2 on (its default).
Before the patch, the run stopped with the error above. With the patch, the scan completed in 37 minutes. The
Codex session files show 4 workers (
baseline_auditor,architecture_reviewer,sql_injection_investigator,command_injection_investigator). Each got aNEW_TASKand sent aFINAL_ANSWER, and no answer was an error.The container has no user namespaces, so Codex ran its commands with
--dangerously-bypass-approvals-and-sandbox.That changes where Codex runs commands, not the requests it sends to Strata.
Failed: none observed.
Not run:
4b9e05a(it ran at7dd5cf1, see above).Limits
authorandrecipientfields.encrypted_contentpart that another server encrypted (for example, from a conversation that started onOpenAI's servers) goes into the prompt as its opaque text.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.