You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Kiro] Multiple outputs for one Codex exec call produce duplicate toolResult entries #3731
OpenCodex: 2.44.0 at af344a28eabcee09a5e04c48ab897449792719c2
Codex Desktop/CLI: 0.153.4
Endpoint: POST /v1/responses
Model: gpt-5.6-luna
Problem
A Codex custom_tool_call can emit several adjacent custom_tool_call_output items with the same call_id. This happens when an exec invocation uses notify() one or more times in addition to its final text() result.
The Kiro adapter currently translates each output into a separate toolResult with the same toolUseId. Kiro accepts one result per tool use and rejects the request with:
Kiro tool result has no matching tool use "call_..."
On the next model request, the Responses input contains three outputs associated with the same call. The adapter sends three Kiro toolResult entries instead of one.
Expected behavior
The Kiro adapter should aggregate adjacent outputs for the same call_id into one toolResult, preserving output order, images, and any error status.
Proposed fix
Aggregate adjacent outputs with the same call_id while converting Responses messages to Kiro messages. Keep ordinary single-output tool calls unchanged. Add a regression test covering a final result plus multiple notifications.
A local implementation has been validated with:
Kiro adapter tests: 81 passed
Responses parser tests: 65 passed
Responses compaction/routing tests: 59 passed
OpenAI Responses passthrough tests: 160 passed
Typecheck and git diff --check
Live Codex smoke test: one tool call produced final-result, update-1, and update-2 under the same call_id, then the Kiro turn completed successfully
The broader test:changed run was stopped because it caused system-wide memory pressure and the Linux kernel terminated Chromium. It was not rerun; the targeted affected suites above completed successfully.
Thanks for taking the time to submit this issue. It was closed automatically because it was not opened with a recognized issue template (Bug report, Feature request, Documentation, or Provider compatibility). Freeform and API-opened issues cannot skip this check.
This issue does not use a recognized issue template.
Please edit the issue to add:
Open a new issue with the Bug report, Feature request, Documentation, or Provider compatibility template.
Or edit this issue so the body uses the template section headings for the kind of report you are filing.
Activity
github-actions commentedon Sep 6, 2026
Issue closed: use an issue template
Thanks for taking the time to submit this issue. It was closed automatically because it was not opened with a recognized issue template (Bug report, Feature request, Documentation, or Provider compatibility). Freeform and API-opened issues cannot skip this check.
Please edit the issue to add:
See the Contributing guide for details.
Once the report passes the automated checks, it will be reopened automatically unless a maintainer has changed its state.