openai / openai/codex

iOS Remote Control should keep a persistent logical session across brief app backgrounding

Open
#41,114 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement iOS remote session
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What platform are you using?
  • Host: Windows 11 running Codex Desktop / Remote Control
  • Client: ChatGPT iOS app (1.2026.202), iOS 26.6
What problem are you seeing?

Codex Remote Control on iOS does not feel persistent enough for normal mobile use.

After I connect successfully to my desktop Codex host, briefly switching ChatGPT to the background is often enough for the remote connection to be lost. When I return to ChatGPT shortly afterward, Codex Remote Control has to reconnect instead of resuming the already-established remote session.

This is especially disruptive because reconnecting is currently slow (often 10+ seconds, tracked separately in #37997). The combination means that ordinary iOS behavior—checking another app, copying something, opening a notification, briefly locking the phone, etc.—can repeatedly interrupt the Codex control session.

The desktop host remains online and Codex continues running locally throughout this process.

Steps to reproduce
  1. Keep Codex Desktop running on a Windows 11 PC with Remote Control enabled.
  2. Open ChatGPT on iPhone and connect to the desktop Codex host.
  3. Open a Codex thread and confirm Remote Control is working.
  4. Switch to another iOS app for a short period.
  5. Return to ChatGPT.
  6. Open/return to the Codex Remote Control view.
  7. Observe that the previous remote connection has been dropped and the client has to reconnect.
  8. Repeat the foreground/background transition; the disconnect/reconnect behavior happens frequently enough to make mobile steering frustrating.
Expected behavior

Remote Control should preserve a persistent logical session across brief iOS foreground/background transitions.

I understand iOS may suspend or terminate background network sockets, so this does not necessarily require keeping a WebSocket physically alive forever in the background. A good implementation could instead preserve the authenticated remote session and enough host/thread state so that returning to ChatGPT performs a near-instant warm resume rather than a full reconnect.

Ideally:

  • Briefly backgrounding ChatGPT should not invalidate the active Remote Control session.
  • The iOS client should retain the selected host, thread, authorization/session token, and recent state necessary to resume immediately.
  • If the transport socket is suspended by iOS, the client should reattach to the same logical session when foregrounded instead of rebuilding the connection from scratch.
  • The UI should show the previous thread immediately from cached state while transport recovery happens in the background.
  • A short background interval should feel like returning to an existing control session, not opening a new remote connection.
Why this matters

Remote Control is most useful as a mobile companion for checking progress, steering Codex, approving actions, and quickly switching between Codex and other phone apps.

On iOS, frequent app switching is normal. If every short background transition effectively destroys the remote session, the control surface becomes unnecessarily fragile even when the desktop host never went offline.

A persistent logical session / warm-resume mechanism would improve the experience independently of raw reconnect speed.

Related issue
  • #37997 — iOS Remote Control reconnects after briefly backgrounding ChatGPT and takes 10+ seconds every time

That issue focuses on reconnect latency. This request focuses on avoiding unnecessary reconnects in the first place by preserving the remote session across normal iOS app lifecycle transitions.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository files, tests, or entry points are named. Start by tracing the iOS Remote Control foreground/background lifecycle and logical-session handling, then compare the behavior described here with related issue #37997. Done means brief backgrounding preserves the selected host and thread state and returns to the existing session without a full reconnect.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, rust
Domain
mobile-dev, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.