This is a small proof package for the Codex remote-control/reconnect problem: when a user returns from another device, phone lock/unlock, app foregrounding, or a host switch, the UI needs to state whether it is attached to a live job or only showing stale metadata.
The point is not to complain about reconnecting. The point is to make the
failure class reproducible, name the missing contract, and demonstrate a
portable attachment classifier on the public codex app-server protocol.
- A runnable app-server probe:
scripts/codex-remote-attach-lab.mjs - A status classifier with test coverage.
- A generated schema snapshot in
schemas-current/from Codex CLI0.142.5. - A technical note for OpenAI in
docs/openai-note.md. - A concrete upstream/product patch plan in
docs/patch-plan.md. - Verification notes in
docs/verification.md. - Outreach drafts in
outreach/for GitHub, X, LinkedIn, and direct email/DM.
npm test
npm run synthetic
npm run probenpm run probe starts a temporary local codex app-server WebSocket listener,
initializes the JSON-RPC connection, calls thread/loaded/list and
thread/list, then emits a truthful attachment label.
The default probe is read-only. It does not start a model turn.
To classify a specific thread:
node scripts/codex-remote-attach-lab.mjs probe --thread <THREAD_ID>To exercise the running-thread rejoin path:
node scripts/codex-remote-attach-lab.mjs probe --resume <THREAD_ID>To start an ephemeral thread without starting a model turn:
node scripts/codex-remote-attach-lab.mjs probe --start-threadTo start a real turn, opt in explicitly:
node scripts/codex-remote-attach-lab.mjs probe --start-thread --start-turnLive Attached: this client is connected and the target thread is loaded in this app-server.Running Elsewhere: metadata says the target is active, but this connection is not attached to it.Launchable: the target exists, but no live transport is attached.Reconnecting: the transport dropped recently enough that the user should see an explicit recovery state.Mirrored Recent: metadata is recent, but live attachment is not proven.Stale Mirror: old metadata exists, but it should not be represented as live.Offline: no app-server transport is reachable.
Codex already has useful primitives:
thread/loaded/listreturns thread IDs currently loaded in memory.thread/resumecan rejoin a running thread bythreadId.thread/status/changedandremoteControl/status/changednotifications can drive client state.
The missing product layer is the user-visible reconnect contract: on every device and host, say what is attached, what is merely known, and what can be safely done next.
- Official Codex manual:
codex app-server,remote connections. - Generated local schema:
npm run schema. - Upstream source inspection:
openai/codex, especiallycodex-rs/app-server/src/request_processors/thread_processor.rs.