Skip to content

[codex-app-server] expose per-surface HTTP state bridge#26138

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

[codex-app-server] expose per-surface HTTP state bridge#26138
cooper-oai wants to merge 1 commit into
cooper/codex-native-http-state/1from
cooper/codex-native-http-state/2

Conversation

@cooper-oai
Copy link
Copy Markdown
Contributor

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

Why

Desktop-over-SSH and other remote app-server clients need to read and update the state file on the host running the app server. The bridge must remain surface-scoped: a client should not be able to mutate an arbitrary local jar.

What changed

  • Add stable httpState/get, httpState/set, and httpState/clear app-server methods.
  • Derive the recognized native surface from the initialized connection's clientInfo.name instead of accepting a caller-supplied surface.
  • Support guarded rotation through expectedState. An omitted or null value performs an unconditional replacement for minting and empty-jar seeding.
  • Generate JSON and TypeScript schema artifacts and document the methods in the app-server README.

Review guide

  • The app server exposes a generic cookie-like bridge, not integrity-specific protocol behavior.
  • Surface selection stays inside the existing initialized-connection trust boundary.
  • The focused suite covers recognized surfaces, unsupported surfaces, guarded updates, unconditional replacement, and clear.

Stack

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

  1. #26137: per-surface store
  2. #26138: app-server bridge (this PR)
  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
  7. #26143: standalone CLI requests

Validation

  • just write-app-server-schema
  • just fmt
  • git diff --check
  • just test -p codex-app-server-protocol
  • just test -p codex-app-server http_state_bridge
  • just fix -p codex-app-server-protocol -p codex-app-server
  • just bazel-lock-check

@cooper-oai cooper-oai marked this pull request as ready for review June 3, 2026 11:03
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/1 branch from 443ecd4 to f8a301c Compare June 3, 2026 11:03
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/2 branch from de6d167 to 6d4cc89 Compare June 3, 2026 11:03
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/1 branch from f8a301c to ebda365 Compare June 3, 2026 11:11
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/2 branch 2 times, most recently from 5d865be to f5981ee Compare June 3, 2026 11:12
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: de6d1675c2

ℹ️ 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/http_state_processor.rs
Comment thread codex-rs/app-server/src/request_processors/http_state_processor.rs
@cooper-oai cooper-oai force-pushed the cooper/codex-native-http-state/2 branch from f5981ee to 44afe34 Compare June 3, 2026 11:37
@cooper-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. Keep them coming!

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

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