Skip to content

Add exec-server transport for unified exec#14655

Closed
starr-openai wants to merge 2 commits intomainfrom
starr/exec-server-unified-exec-ssh
Closed

Add exec-server transport for unified exec#14655
starr-openai wants to merge 2 commits intomainfrom
starr/exec-server-unified-exec-ssh

Conversation

@starr-openai
Copy link
Copy Markdown
Contributor

Summary

Part 1

  • add [exec_server].command config plumbing so experimental_exec_server can launch through an explicit command vector such as ssh -T dev ...
  • resolve that launch command in codex-core, document it in docs/config.md, and cover the config parsing/launch-command behavior in tests
  • propagate exec_server.command through codex exec thread start/resume so the exec-server override survives the app-server boundary

Part 2

  • make remote exec-server startup more tolerant of host differences by remapping missing local shell paths to a usable remote shell family
  • remap macOS /private/... cwd aliases to the stripped path when that directory exists remotely, which fixes /private/tmp vs /tmp over SSH
  • preserve the original remote output receiver so very short one-off commands do not lose early stdout before unified-exec subscribes
  • add focused coverage for the short-command remote-output path in codex-core

Testing

  • cargo test -p codex-exec-server
  • cargo test -p codex-core unified_exec_short_command_captures_output_through_exec_server -- --nocapture
  • manual e2e:
    • build local codex
    • build remote codex-exec-server on dev
    • run:
cd /tmp
unset CODEX_EXEC_SERVER_EXE
/Users/starr/code/codex/codex-rs/target/debug/codex exec \
  --json \
  --skip-git-repo-check \
  --dangerously-bypass-approvals-and-sandbox \
  --enable experimental_exec_server \
  -c 'exec_server.command=["ssh","-o","ClearAllForwardings=yes","-T","dev","/home/dev-user/codex-rs/target/debug/codex-exec-server"]' \
  'Use exec_command to run `hostname` exactly once and then answer with only the stdout.'
  • observed output: dev-0

Notes

  • I did not run the full cargo test workspace suite after the core changes.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 14, 2026


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


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


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

starr-openai and others added 2 commits March 13, 2026 18:05
- add exec_server.command config plumbing and propagate it through codex exec session startup
- fix remote shell path/cwd translation and preserve early stdout for short exec-server commands

Co-authored-by: Codex <noreply@openai.com>
@starr-openai starr-openai force-pushed the starr/exec-server-unified-exec-ssh branch from e2b5776 to 5a083e7 Compare March 14, 2026 01:08
@etraut-openai etraut-openai added the oai PRs contributed by OpenAI employees label Mar 16, 2026
starr-openai added a commit that referenced this pull request Mar 16, 2026
This cleanly splits the exec-server transport changes from #14655.
It excludes the SSH-backed routing follow-up and includes the
schema and build fixes needed for this slice to compile cleanly.

Co-authored-by: Codex <noreply@openai.com>
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