Skip to content

[codex] add waypoints: multi-host remote execution#17362

Draft
nlieb-oai wants to merge 6 commits intomainfrom
dev/nlieb/remote-ssh-exec-registry
Draft

[codex] add waypoints: multi-host remote execution#17362
nlieb-oai wants to merge 6 commits intomainfrom
dev/nlieb/remote-ssh-exec-registry

Conversation

@nlieb-oai
Copy link
Copy Markdown

@nlieb-oai nlieb-oai commented Apr 10, 2026

Summary

This adds a shared multi-host execution registry above individual Codex sessions. It preserves the existing local/default environment behavior while allowing registered hosts to be selected per exec_command invocation via host_id.

The initial host backend added here is SSH-backed. Codex starts a remote codex exec-server through the SSH host from ~/.ssh/config and proxies the websocket over the SSH command stream, which avoids requiring SSH TCP forwarding. The implementation also captures the remote default cwd and shell so unified exec can format shell commands for the selected host rather than blindly using the local shell.

Details

  • Adds CODEX_EXEC_SERVER_SSH_HOSTS and CODEX_EXEC_SERVER_DEFAULT_HOST environment support.
  • Adds a registry of local, URL-backed, and SSH-backed exec hosts.
  • Adds optional host_id to the unified exec_command tool schema and approval key.
  • Keeps the environment manager shared through sessions and sub-agents.
  • Adds compatibility for older exec-server initialize responses that returned {} before sessionId existed.
  • Adds an ignored SSH smoke test that can be run with any configured SSH host via CODEX_TEST_SSH_HOST.

Validation

  • cargo fmt -p codex-exec-server -p codex-core -p codex-tools
  • cargo check -p codex-exec-server -p codex-core -p codex-tools
  • cargo check -p codex-tools
  • cargo test -p codex-exec-server environment
  • cargo test -p codex-exec-server initialize_response_accepts_legacy_empty_payload
  • CODEX_TEST_SSH_HOST=<ssh-host> cargo test -p codex-exec-server environment::tests::ssh_environment_manager_bootstraps_configured_host -- --ignored --nocapture
  • CODEX_SKIP_VENDORED_BWRAP=1 cargo test -p codex-core unified_exec:: --lib
  • cargo test -p codex-tools
  • git diff --check

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@nlieb-oai nlieb-oai force-pushed the dev/nlieb/remote-ssh-exec-registry branch from 49c4046 to 6a44fb6 Compare April 10, 2026 18:27
@nlieb-oai nlieb-oai changed the title dev/nlieb/remote-ssh-exec-registry [codex] add waypoints: multi-host remote execution Apr 10, 2026
@nlieb-oai
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Apr 10, 2026
@nlieb-oai nlieb-oai force-pushed the dev/nlieb/remote-ssh-exec-registry branch from eb54e08 to 41e490d Compare April 10, 2026 19:58
@etraut-openai etraut-openai added the oai PRs contributed by OpenAI employees label Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

oai PRs contributed by OpenAI employees

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants