Skip to content

[codex] cover app-owned HTTP requests#26142

Open
cooper-oai wants to merge 1 commit into
cooper/codex-native-http-state/5from
cooper/codex-native-http-state/6
Open

[codex] cover app-owned HTTP requests#26142
cooper-oai wants to merge 1 commit into
cooper/codex-native-http-state/5from
cooper/codex-native-http-state/6

Conversation

@cooper-oai
Copy link
Copy Markdown
Contributor

@cooper-oai cooper-oai commented Jun 3, 2026

Why

Some app-owned requests bypass the shared model and backend clients covered by #26141. This routing layer attributes the remaining connection-owned work without inventing ownership for process-global background activity.

What changed

  • Attribute app-server connection-owned ChatGPT helpers, extensions, connectors, plugins, threadless MCP, session helpers, and standalone realtime WebSocket requests.
  • Pass HTTP-state context into Codex Apps MCP and plugin background work so attributable requests attach and rotate state.
  • Derive independent per-turn surface snapshots for Apps MCP refresh and file upload. Snapshots share the store but do not alias the mutable session surface selection.
  • Resolve model-turn auth with the selected surface, including proactive refresh and HTTP or WebSocket /responses 401 recovery.
  • Leave process-global background requests unattributed when no initiating surface exists.

Review guide

  • This is a broad but shallow attribution pass: reusable storage, protocol, lifecycle, and shared-client behavior live in earlier PRs.
  • Each call site should take ownership from its initiating app-server connection or turn. It should not default unattributed work to desktop or CLI.
  • The per-turn snapshot prevents a later clientInfo update from sending or rotating another surface's jar during MCP work.

Stack

This is PR 6 of 7 in the native HTTP-state stack. It depends on #26141.

  1. #26137: per-surface store
  2. #26138: app-server bridge
  3. #26139: HTTP and WebSocket transport
  4. #26140: login, refresh, logout, and remote control
  5. #26141: shared model and backend clients
  6. #26142: app-owned requests (this PR)
  7. #26143: standalone CLI requests

Validation

  • codex-app-server: 811 tests passed
  • codex-core-plugins, codex-chatgpt, codex-mcp, and codex-rmcp-client: 338 tests passed; the RMCP remote harness passed after building its expected codex binary
  • codex-http-state: 5 tests passed
  • Focused Apps file-upload integration test passed
  • just test -p codex-core response_401_refresh_preserves_native_http_state_surface
  • just fix -p codex-core
  • just fmt
  • just bazel-lock-update produced no lockfile delta
  • git diff --check

@cooper-oai cooper-oai marked this pull request as ready for review June 3, 2026 11:03
@cooper-oai cooper-oai requested a review from a team as a June 3, 2026 11:03
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/5 branch from 0f98cbc to 92a056e Compare June 3, 2026 11:03
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/6 branch from 4dbee83 to 2fdfb6f Compare June 3, 2026 11:03
Copy link
Copy Markdown
Contributor

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

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: 2fdfb6f6a7

ℹ️ 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/app-server/src/request_processors/plugins.rs
Comment thread codex-rs/chatgpt/Cargo.toml
Comment thread codex-rs/core/src/session/session.rs
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/5 branch from 92a056e to acff8c9 Compare June 3, 2026 11:11
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/6 branch 2 times, most recently from 4a4139c to 8fd86c3 Compare June 3, 2026 11:12
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/5 branch from acff8c9 to 3512c13 Compare June 3, 2026 11:12
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/6 branch from 8fd86c3 to c42a6a5 Compare June 3, 2026 11:37
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/5 branch 2 times, most recently from bd0e5f8 to f8352e8 Compare June 3, 2026 12:33
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/6 branch from c42a6a5 to a53406e Compare June 3, 2026 12:33
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/5 branch from f8352e8 to d9daedf Compare June 3, 2026 12:45
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/6 branch from a53406e to bb0c886 Compare June 3, 2026 12:45
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/5 branch from d9daedf to f5944ee Compare June 3, 2026 13:08
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/6 branch from bb0c886 to 3ede242 Compare June 3, 2026 13:08
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/5 branch from f5944ee to 77999e5 Compare June 3, 2026 13:25
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/6 branch from 3ede242 to 40aa220 Compare June 3, 2026 13:25
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/5 branch from 77999e5 to a9a7ba6 Compare June 3, 2026 13:52
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/6 branch 2 times, most recently from 946d79c to 993f2e0 Compare June 3, 2026 14:44
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/5 branch from a9a7ba6 to 115ba55 Compare June 3, 2026 14:44
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/6 branch from 993f2e0 to f437c2c Compare June 3, 2026 15:50
@cooper-oai
Copy link
Copy Markdown
Contributor Author

@codex review

@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/6 branch from f437c2c to f07afab Compare June 3, 2026 16:02
Copy link
Copy Markdown
Contributor

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

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: f437c2c6af

ℹ️ 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/chatgpt/Cargo.toml
Comment thread codex-rs/core/src/session/turn.rs
Comment thread codex-rs/app-server/src/request_processors/plugins.rs
Comment thread codex-rs/core/src/session/mcp.rs Outdated
Comment thread codex-rs/core/src/mcp_openai_file.rs
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/6 branch from f07afab to a1cdb1b Compare June 3, 2026 16:41
@cooper-oai
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown
Contributor

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

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: a1cdb1be2f

ℹ️ 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/chatgpt/Cargo.toml
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/5 branch from 4119b85 to ec2e111 Compare June 3, 2026 23:44
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/6 branch from 465e2da to d766866 Compare June 3, 2026 23:44
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