Skip to content

feat(remote-control): add pairing start#25675

Merged
apanasenko-oai merged 3 commits into
mainfrom
codex/remote-control-pairing-start-fresh
Jun 2, 2026
Merged

feat(remote-control): add pairing start#25675
apanasenko-oai merged 3 commits into
mainfrom
codex/remote-control-pairing-start-fresh

Conversation

@apanasenko-oai
Copy link
Copy Markdown
Collaborator

@apanasenko-oai apanasenko-oai commented Jun 1, 2026

Why

Remote control enrollment authorizes a desktop server, but app-server v2 did not expose the follow-up pairing operation needed to mint a short-lived controller pairing artifact from that enrolled server. Clients need a narrow RPC that starts pairing without exposing the backend serverId or conflating pairing with websocket connection state.

Issue: N/A; internal remote-control pairing API change.

What Changed

Added experimental app-server v2 remoteControl/pairing/start with manualCode input and pairingCode, nullable manualPairingCode, environmentId, and Unix-seconds expiresAt output. The method serializes under its own global("remote-control-pairing") scope and is documented in app-server/README.md.

Extended the remote-control transport with private /server/pair request/response types and normalized pair_url handling. Pairing uses the current enrolled server bearer, refreshes that bearer when needed, keeps backend server_id private, validates returned server_id and environment_id against the current enrollment, and preserves backend status/header/body context for failures and malformed responses.

Wired the request through RemoteControlRequestProcessor and MessageProcessor, mapping unavailable/disabled pairing to invalid_request and backend failures to internal errors.

Verification

  • just test -p codex-app-server-transport
  • just test -p codex-app-server remote_control_pairing_start_returns_pairing_artifacts

@apanasenko-oai apanasenko-oai changed the title Add remote control pairing start feat(remote-control): add pairing start Jun 1, 2026
@apanasenko-oai apanasenko-oai marked this pull request as ready for review June 1, 2026 19:58
@apanasenko-oai apanasenko-oai force-pushed the codex/remote-control-pairing-start-fresh branch from cbcbe7c to f2db82e Compare June 1, 2026 20:04
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: cbcbe7cb94

ℹ️ 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-transport/src/transport/remote_control/mod.rs Outdated
Comment thread codex-rs/app-server-protocol/src/protocol/common.rs
Copy link
Copy Markdown
Collaborator

@viyatb-oai viyatb-oai left a comment

Choose a reason for hiding this comment

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

Added one line-anchored suggestion for the stale remote-control pairing enrollment race.

Comment thread codex-rs/app-server-transport/src/transport/remote_control/mod.rs
@apanasenko-oai apanasenko-oai force-pushed the codex/remote-control-pairing-start-fresh branch 2 times, most recently from a026e1a to 5a6ffd9 Compare June 1, 2026 22:01
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: 5a6ffd9020

ℹ️ 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-transport/src/transport/remote_control/mod.rs
Copy link
Copy Markdown
Collaborator

@owenlin0 owenlin0 left a comment

Choose a reason for hiding this comment

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

Found one issue.

Comment thread codex-rs/app-server-transport/src/transport/remote_control/mod.rs
@apanasenko-oai apanasenko-oai force-pushed the codex/remote-control-pairing-start-fresh branch from a7c79f8 to c4ffb29 Compare June 2, 2026 00:22
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: c4ffb299f9

ℹ️ 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-transport/src/transport/remote_control/mod.rs Outdated
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: f0ec5554da

ℹ️ 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-protocol/src/protocol/common.rs
@apanasenko-oai apanasenko-oai enabled auto-merge (squash) June 2, 2026 01:03
@apanasenko-oai apanasenko-oai merged commit 0002316 into main Jun 2, 2026
31 checks passed
@apanasenko-oai apanasenko-oai deleted the codex/remote-control-pairing-start-fresh branch June 2, 2026 01:05
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants