What happened?
When an agent runs a server-side tool (e.g. execute_code) through POST /api/agents/v1/responses, the tool's result is never emitted on the stream or persisted. The response output contains the function_call item (with arguments) but no matching function_call_output item, so an API consumer sees the call but not its output. (/chat/completions and normal chat surface the result fine.)
Expected
A function_call_output item carrying the tool's textual result, per the Open Responses spec.
Likely cause (code inspection)
The Responses tool-end callback (createResponsesToolEndCallback, api/server/controllers/agents/callbacks.js) early-returns when there's no output.artifact and never emits the tool's text result (output.content) via emitFunctionCallOutputItem. responses.js wires on_tool_end to that artifact-only handler; the on_tool_end in packages/api/src/agents/responses/service.ts that does call emitFunctionCallOutputItem is never wired into the Responses graph.
Version Information
current main (v0.8.8-rc4)
Steps to Reproduce
- Configure an agent with
execute_code enabled.
POST /api/agents/v1/responses {"model":"agent_xxx","input":"run python that prints 2+2","stream":false}.
- Inspect
response.output: there is a function_call item but no corresponding function_call_output.
What browsers are you seeing the problem on?
No response
Relevant log output
Screenshots
No response
Code of Conduct
What happened?
When an agent runs a server-side tool (e.g.
execute_code) throughPOST /api/agents/v1/responses, the tool's result is never emitted on the stream or persisted. The responseoutputcontains thefunction_callitem (with arguments) but no matchingfunction_call_outputitem, so an API consumer sees the call but not its output. (/chat/completionsand normal chat surface the result fine.)Expected
A
function_call_outputitem carrying the tool's textual result, per the Open Responses spec.Likely cause (code inspection)
The Responses tool-end callback (
createResponsesToolEndCallback,api/server/controllers/agents/callbacks.js) early-returns when there's nooutput.artifactand never emits the tool's text result (output.content) viaemitFunctionCallOutputItem.responses.jswireson_tool_endto that artifact-only handler; theon_tool_endinpackages/api/src/agents/responses/service.tsthat does callemitFunctionCallOutputItemis never wired into the Responses graph.Version Information
current
main(v0.8.8-rc4)Steps to Reproduce
execute_codeenabled.POST /api/agents/v1/responses{"model":"agent_xxx","input":"run python that prints 2+2","stream":false}.response.output: there is afunction_callitem but no correspondingfunction_call_output.What browsers are you seeing the problem on?
No response
Relevant log output
Screenshots
No response
Code of Conduct