Skip to content

[codex] Exclude completed output from streamed Responses requests#23783

Draft
lancepereira-oai wants to merge 1 commit into
mainfrom
dev/codex_exclude_output_streaming
Draft

[codex] Exclude completed output from streamed Responses requests#23783
lancepereira-oai wants to merge 1 commit into
mainfrom
dev/codex_exclude_output_streaming

Conversation

@lancepereira-oai
Copy link
Copy Markdown

Summary

  • Send exclude: ["output"] on Codex's streamed Responses create requests.
  • Thread the field through the shared HTTP/WebSocket request payload types.
  • Omit exclude entirely when it is empty so unrelated request shapes do not change.

Why

Codex consumes streamed output items from incremental events and does not read terminal response.completed.output, so the completed response payload is redundant for this path.

Main Changes

build streamed Responses request:
  stream = true
  exclude = ["output"]

serialize request:
  include exclude only when non-empty

websocket response.create:
  copy exclude from the shared request payload

Tests

  • cargo test -p codex-core build_responses_request_excludes_completed_output
  • cargo test -p codex-core omits_exclude_when_not_set
  • cargo test -p codex-api

Notes

  • I also added the existing CLI streaming request-body assertion for exclude, but the local CLI integration is currently blocked before request dispatch by this desktop config mismatch: approvals_reviewer = "auto_review" is rejected by this branch, which only accepts user or guardian_subagent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant