Skip to content

[codex] Make turn state replaceable - #27930

Closed
aibrahim-oai wants to merge 1 commit into
mainfrom
codex/model-bound-http-turn-state
Closed

[codex] Make turn state replaceable#27930
aibrahim-oai wants to merge 1 commit into
mainfrom
codex/model-bound-http-turn-state

Conversation

@aibrahim-oai

@aibrahim-oai aibrahim-oai commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Keep opaque turn state scoped to a model client session and allow each response to replace it.

  • start each new session without turn state
  • replay the current value on later requests in the same session
  • replace the value whenever a response returns an update

Stack

  1. [codex] Make turn state replaceable #27930 — replaceable HTTP turn state (this PR)
  2. [codex] Round-trip turn state through compact #27931 — compact round-trip
  3. [codex] Send request-scoped turn state over WebSocket #27929 — WebSocket request metadata

Coverage

  • existing HTTP session/reset coverage remains unchanged
  • replacement values are replayed across multiple requests in one turn
  • a new logical turn starts without the prior turn's value

@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: 09cc0ae3f6

ℹ️ 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".

Comment thread codex-rs/core/src/client_tests.rs Outdated
@aibrahim-oai
aibrahim-oai force-pushed the codex/model-bound-http-turn-state branch from 09cc0ae to 5db8ef1 Compare June 12, 2026 18:44
@aibrahim-oai aibrahim-oai changed the title [codex] Bind HTTP turn state to requested model [codex] Bind turn state to requested model Jun 12, 2026

@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: 5db8ef1b57

ℹ️ 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".

Comment thread codex-rs/core/src/client.rs Outdated
@aibrahim-oai
aibrahim-oai force-pushed the codex/model-bound-http-turn-state branch 2 times, most recently from c73a2b3 to c9cf1b5 Compare June 12, 2026 19:11
@aibrahim-oai aibrahim-oai changed the title [codex] Bind turn state to requested model [codex] Make turn state replaceable Jun 12, 2026
@aibrahim-oai
aibrahim-oai force-pushed the codex/model-bound-http-turn-state branch from c9cf1b5 to 748b8e1 Compare June 12, 2026 21:17
@aibrahim-oai
aibrahim-oai force-pushed the codex/model-bound-http-turn-state branch from 748b8e1 to b05a1ff Compare June 12, 2026 21:22
@aibrahim-oai

Copy link
Copy Markdown
Contributor Author

@codex review

@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: b05a1ffb8e

ℹ️ 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".

pub extra_headers: HeaderMap,
pub compression: Compression,
pub turn_state: Option<Arc<OnceLock<String>>>,
pub turn_state: Option<Arc<Mutex<String>>>,

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.

P1 Badge Preserve ResponsesOptions source compatibility

Changing this public field from OnceLock to Mutex breaks source compatibility for crates that construct ResponsesOptions or share the documented turn-state handle; those callers now fail to compile. Please preserve a compatible API or stage the external-surface break. guidance

Useful? React with 👍 / 👎.

@aibrahim-oai

Copy link
Copy Markdown
Contributor Author

Closing this stack to replace it with one consolidated PR.

@aibrahim-oai

Copy link
Copy Markdown
Contributor Author

Replaced by #27996.

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