Skip to content

[codex] Send request-scoped turn state over WebSocket - #27929

Closed
aibrahim-oai wants to merge 1 commit into
codex/compact-turn-statefrom
codex/request-scoped-ws-turn-state
Closed

[codex] Send request-scoped turn state over WebSocket#27929
aibrahim-oai wants to merge 1 commit into
codex/compact-turn-statefrom
codex/request-scoped-ws-turn-state

Conversation

@aibrahim-oai

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

Copy link
Copy Markdown
Contributor

Summary

Carry opaque turn state in each WebSocket response.create request and accept updates from response metadata.

  • send state per request rather than in connection upgrade headers
  • reuse the latest value across requests in the same turn and on reconnect
  • reset state for each new logical turn, even when the WebSocket connection is reused
  • preserve updates when compaction crosses between WebSocket and HTTP

Stack

  1. [codex] Make turn state replaceable #27930 — replaceable HTTP turn state
  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 (this PR)

Coverage

  • WebSocket response metadata replaces state within a session
  • same-turn follow-ups replay updates while the next turn starts empty
  • a model change on a reused connection sends a full create and then accepts replacement state
  • WebSocket v2 compact round-trips state on one connection
  • WebSocket sampling with v1 HTTP compact carries the update back to WebSocket continuation

@aibrahim-oai
aibrahim-oai force-pushed the codex/compact-turn-state branch from 1a75dcb to 7ffdd61 Compare June 12, 2026 18:44
@aibrahim-oai
aibrahim-oai force-pushed the codex/request-scoped-ws-turn-state branch from 27bcdb6 to d4b507a Compare June 12, 2026 18:44
@aibrahim-oai
aibrahim-oai force-pushed the codex/compact-turn-state branch from 7ffdd61 to 8313869 Compare June 12, 2026 18:51
@aibrahim-oai
aibrahim-oai force-pushed the codex/request-scoped-ws-turn-state branch 2 times, most recently from 22c82c5 to c9648f0 Compare June 12, 2026 19:11
@aibrahim-oai
aibrahim-oai force-pushed the codex/compact-turn-state branch 2 times, most recently from e4ab789 to 005bb27 Compare June 12, 2026 20:20
@aibrahim-oai
aibrahim-oai force-pushed the codex/request-scoped-ws-turn-state branch from c9648f0 to 3bc5c79 Compare June 12, 2026 20:20
@aibrahim-oai
aibrahim-oai marked this pull request as ready for review June 12, 2026 20:55
@aibrahim-oai
aibrahim-oai requested a review from a team as a June 12, 2026 20:55
@aibrahim-oai
aibrahim-oai force-pushed the codex/compact-turn-state branch from 005bb27 to 5dd34cc Compare June 12, 2026 21:17
@aibrahim-oai
aibrahim-oai force-pushed the codex/request-scoped-ws-turn-state branch from 3bc5c79 to a154b32 Compare June 12, 2026 21:17
@aibrahim-oai
aibrahim-oai force-pushed the codex/compact-turn-state branch from 5dd34cc to 62b3bdd Compare June 12, 2026 21:22
@aibrahim-oai
aibrahim-oai force-pushed the codex/request-scoped-ws-turn-state branch 2 times, most recently from 1c2c44e to 0a42f30 Compare June 12, 2026 21:29
@aibrahim-oai
aibrahim-oai force-pushed the codex/compact-turn-state branch from 62b3bdd to 763f6fd Compare June 12, 2026 21:33
@aibrahim-oai
aibrahim-oai force-pushed the codex/request-scoped-ws-turn-state branch 5 times, most recently from 1d85d26 to c596572 Compare June 12, 2026 22:18
@aibrahim-oai
aibrahim-oai force-pushed the codex/request-scoped-ws-turn-state branch from c596572 to e0d264c Compare June 12, 2026 22:21
@aibrahim-oai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: e0d264cdc2

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

@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