Skip to content

add top-level remote-control command#21424

Merged
owenlin0 merged 2 commits into
mainfrom
owen/codex_remote_control_subcommand
May 7, 2026
Merged

add top-level remote-control command#21424
owenlin0 merged 2 commits into
mainfrom
owen/codex_remote_control_subcommand

Conversation

@owenlin0

@owenlin0 owenlin0 commented May 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

codex --enable remote_control app-server --listen off is the current way to start a headless, remote-controllable app-server, but it is hard to remember and exposes implementation details.

This adds codex remote-control as a friendly top-level wrapper for that flow. The command starts a foreground app-server with local transports disabled and enables remote_control only for that invocation.

Changes

  • Add a visible codex remote-control CLI subcommand.
  • Launch app-server with AppServerTransport::Off.
  • Append features.remote_control=true after root feature toggles so the explicit command wins over --disable remote_control.
  • Reject root --remote / --remote-auth-token-env, matching other non-TUI subcommands.
  • Add tests for parsing, launch defaults, override ordering, and remote flag rejection.

Verification

  • cargo test -p codex-cli
  • just fix -p codex-cli

@owenlin0 owenlin0 changed the title add command Add codex remote-control command May 6, 2026
@owenlin0 owenlin0 changed the title Add codex remote-control command add top-level remote-control command May 6, 2026
@owenlin0 owenlin0 force-pushed the owen/codex_remote_control_subcommand branch from 49d574c to 1db31fe Compare May 6, 2026 22:09
@owenlin0 owenlin0 marked this pull request as ready for review May 6, 2026 22:11
@owenlin0 owenlin0 force-pushed the owen/codex_remote_control_subcommand branch 2 times, most recently from b9a7186 to 9cd26d6 Compare May 6, 2026 22:21
Comment thread codex-rs/cli/src/main.rs Outdated
codex_config::LoaderOverrides::default(),
/*default_analytics_enabled*/ false,
codex_app_server::AppServerTransport::Off,
codex_protocol::protocol::SessionSource::VSCode,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Cli

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

🤦 good catch

@owenlin0 owenlin0 enabled auto-merge (squash) May 7, 2026 00:33
@owenlin0 owenlin0 disabled auto-merge May 7, 2026 16:01
@owenlin0 owenlin0 force-pushed the owen/codex_remote_control_subcommand branch from 8e9fa72 to 1f0db80 Compare May 7, 2026 16:02
@owenlin0 owenlin0 enabled auto-merge (squash) May 7, 2026 16:36
@owenlin0 owenlin0 disabled auto-merge May 7, 2026 17:09
@owenlin0 owenlin0 merged commit 129401d into main May 7, 2026
47 of 50 checks passed
@owenlin0 owenlin0 deleted the owen/codex_remote_control_subcommand branch May 7, 2026 17:17
@github-actions github-actions Bot locked and limited conversation to collaborators May 7, 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