Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Codex Remote Attach Lab

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.

What This Ships

  • 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 CLI 0.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.

Quickstart

npm test
npm run synthetic
npm run probe

npm 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-thread

To start a real turn, opt in explicitly:

node scripts/codex-remote-attach-lab.mjs probe --start-thread --start-turn

Truth Labels

  • Live 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.

Why This Matters

Codex already has useful primitives:

  • thread/loaded/list returns thread IDs currently loaded in memory.
  • thread/resume can rejoin a running thread by threadId.
  • thread/status/changed and remoteControl/status/changed notifications 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.

Source Anchors

  • Official Codex manual: codex app-server, remote connections.
  • Generated local schema: npm run schema.
  • Upstream source inspection: openai/codex, especially codex-rs/app-server/src/request_processors/thread_processor.rs.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages