Skip to content

Improve codex remote-control CLI UX#22878

Merged
owenlin0 merged 4 commits into
mainfrom
owen/better_remote_control_cli_ux
May 18, 2026
Merged

Improve codex remote-control CLI UX#22878
owenlin0 merged 4 commits into
mainfrom
owen/better_remote_control_cli_ux

Conversation

@owenlin0
Copy link
Copy Markdown
Collaborator

@owenlin0 owenlin0 commented May 15, 2026

Description

This PR makes codex remote-control behave like a foreground CLI command by default. Running it now starts remote control, waits for readiness, prints a clear status message with the machine name, and stays alive until Ctrl-C.

Users who want daemon behavior can use codex remote-control start, and codex remote-control stop now prints concise human-readable output. --json remains available for scripts.

Implementation-wise, this now verifies the real app-server state instead of just assuming startup worked. The CLI starts or connects to app-server, probes its control socket, calls the remoteControl/enable API, and waits for the remote-control status response/notification before printing success.

For daemon mode, codex remote-control start also reports which managed app-server binary was used, including its path and best-effort codex --version, so failures are easier to diagnose.

Examples

Example output:

> codex remote-control
Starting app-server with remote control enabled...
This machine is available for remote control as com-97826.
Press Ctrl-C to stop.

Error case using daemon (currently expected based on our publicly released CLI version):

> ./target/debug/codex remote-control start
Starting app-server daemon with remote control enabled...
Error: app server did not become ready on /Users/owen/.codex/app-server-control/app-server-control.sock

Daemon used app-server:
  path: /Users/owen/.codex/packages/standalone/current/codex
  version: 0.130.0

Managed app-server stderr (/Users/owen/.codex/app-server-daemon/app-server.stderr.log):
  error: unexpected argument '--remote-control' found
  
  Usage: codex app-server [OPTIONS] [COMMAND]
  
  For more information, try '--help'.

Caused by:
    0: failed to connect to /Users/owen/.codex/app-server-control/app-server-control.sock
    1: No such file or directory (os error 2)

What changed

  • codex remote-control now runs remote control in the foreground and prints a Ctrl-C stop hint.
  • codex remote-control start starts the daemon and waits for remote control readiness before reporting success.
  • codex remote-control stop reports stopped/not-running status in plain language.
  • Startup failures now include recent managed app-server stderr to make daemon issues easier to diagnose.
  • Added coverage for CLI output, readiness waiting, foreground shutdown, and stderr log tailing.

@owenlin0 owenlin0 changed the title improve remote-control CLI UX Improve codex remote-control CLI UX May 15, 2026
@owenlin0 owenlin0 force-pushed the owen/better_remote_control_cli_ux branch 3 times, most recently from fd52226 to 39d2488 Compare May 15, 2026 20:03
@owenlin0 owenlin0 force-pushed the owen/remote_control_api_update branch from 7d1d019 to 1c10c8d Compare May 15, 2026 20:56
@owenlin0 owenlin0 force-pushed the owen/better_remote_control_cli_ux branch from 39d2488 to cd3f6bc Compare May 15, 2026 20:56
Base automatically changed from owen/remote_control_api_update to main May 15, 2026 21:33
@owenlin0 owenlin0 force-pushed the owen/better_remote_control_cli_ux branch from cd3f6bc to 52c9154 Compare May 15, 2026 21:35
@owenlin0 owenlin0 force-pushed the owen/better_remote_control_cli_ux branch from 52c9154 to a37e0df Compare May 15, 2026 21:59
@owenlin0 owenlin0 marked this pull request as ready for review May 15, 2026 23:06
@owenlin0 owenlin0 requested a review from apanasenko-oai May 15, 2026 23:08
@owenlin0 owenlin0 merged commit 1752f37 into main May 18, 2026
31 checks passed
@owenlin0 owenlin0 deleted the owen/better_remote_control_cli_ux branch May 18, 2026 20:39
@github-actions github-actions Bot locked and limited conversation to collaborators May 18, 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.

2 participants