[codex] Add configurable reasoning summary delivery#30752
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ded89cfb27
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "invalid reasoning_summary_delivery override: {error}" | ||
| )) | ||
| })?; | ||
| existing_thread.set_reasoning_summary_delivery(reasoning_summary_delivery); |
There was a problem hiding this comment.
Validate resume before mutating delivery
When a client resumes a running thread with both reasoning_summary_delivery and a stale path, this mutates the existing thread before the path consistency check below returns invalid_request. The failed resume can still change stream options for later turns observed by other clients; defer the setter until after the path and resume-mismatch validation succeeds.
AGENTS.md reference: AGENTS.md:L102-L110
Useful? React with 👍 / 👎.
| pub model_reasoning_effort: Option<ReasoningEffort>, | ||
| pub plan_mode_reasoning_effort: Option<ReasoningEffort>, | ||
| pub model_reasoning_summary: Option<ReasoningSummary>, | ||
| pub reasoning_summary_delivery: Option<ReasoningSummaryDelivery>, |
There was a problem hiding this comment.
Forward reasoning delivery through TUI thread params
When this config is set in a local TUI session connected to a remote app server, the value is parsed into Config here, but config_request_overrides_from_config in tui/src/app_server_session.rs is the path that serializes local Config into thread/start, thread/resume, and thread/fork overrides and it still omits reasoning_summary_delivery. The remote app server therefore never sees the new knob, so include it in that overrides map and its coverage.
AGENTS.md reference: AGENTS.md:L102-L110
Useful? React with 👍 / 👎.
dylan-hurd-oai
left a comment
There was a problem hiding this comment.
This generally makes sense, but I'd like to better understand why we have to have the mutex specifically for this new field
| .reasoning_summary_delivery | ||
| .lock() | ||
| .unwrap_or_else(std::sync::PoisonError::into_inner) = Some(reasoning_summary_delivery); | ||
| } |
There was a problem hiding this comment.
It seems like we're doing this so we can special case it and change this while a thread is "active." I don't think we have equivalent methods for other fields on this struct, is this strictly necessary?
Summary
reasoning_summary_deliveryconfig option withsequential,concurrent, andconcurrent_cutoffvaluesstream_options.reasoning_summary_deliveryon OpenAI Responses API requests over HTTP and WebSocketWhy
The Responses API can deliver reasoning summaries concurrently with later response items, but clients must explicitly request the delivery mode. This gives the CLI and app-server config path a typed way to opt in while preserving existing behavior by default.
Validation