Skip to content

[codex] Wire reasoning summary delivery configuration#30752

Open
alexi-openai wants to merge 1 commit into
codex/interleaved-reasoning-itemsfrom
codex/reasoning-summary-delivery
Open

[codex] Wire reasoning summary delivery configuration#30752
alexi-openai wants to merge 1 commit into
codex/interleaved-reasoning-itemsfrom
codex/reasoning-summary-delivery

Conversation

@alexi-openai

@alexi-openai alexi-openai commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a typed reasoning_summary_delivery config option with sequential, concurrent, and concurrent_cutoff values
  • send stream_options.reasoning_summary_delivery on OpenAI Responses API requests over HTTP and WebSocket
  • expose the option through app-server thread start, resume, and fork parameters
  • preserve the override through live resume and config locking while omitting it for custom providers

Stack

Depends on #30876.

Validation

  • combined stack previously passed the full GitHub Actions matrix
  • focused codex-core HTTP, WebSocket, non-OpenAI omission, and config-lock tests
  • focused app-server typed override and live-resume tests
  • app-server protocol serialization and schema fixtures
  • scoped Clippy and formatting

@alexi-openai alexi-openai marked this pull request as ready for review June 30, 2026 20:35
@alexi-openai alexi-openai requested a review from a team as a code owner June 30, 2026 20:35

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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>,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 dylan-hurd-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This generally makes sense, but I'd like to better understand why we have to have the mutex specifically for this new field

Comment thread codex-rs/core/src/client.rs Outdated
.reasoning_summary_delivery
.lock()
.unwrap_or_else(std::sync::PoisonError::into_inner) = Some(reasoning_summary_delivery);
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@alexi-openai alexi-openai force-pushed the codex/reasoning-summary-delivery branch from 8b6a1e4 to cd47325 Compare July 1, 2026 23:02
@alexi-openai alexi-openai changed the title [codex] Add configurable reasoning summary delivery [codex] Wire reasoning summary delivery configuration Jul 1, 2026
@alexi-openai alexi-openai changed the base branch from main to codex/interleaved-reasoning-items July 1, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants