Skip to content

[codex] Honor remote environment cwd and shell#28123

Merged
anp-oai merged 1 commit into
codex/turn-environment-cwd-path-urifrom
codex/remote-environment-native-shell-cwd
Jun 13, 2026
Merged

[codex] Honor remote environment cwd and shell#28123
anp-oai merged 1 commit into
codex/turn-environment-cwd-path-urifrom
codex/remote-environment-native-shell-cwd

Conversation

@anp-oai

@anp-oai anp-oai commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Why

Cross-OS remote execution needs both the selected environment cwd and its native shell to survive orchestration. After turn environment selections carry cwd as PathUri, the remaining behavior still rewrites a remote primary cwd to the local legacy fallback and builds commands with the orchestrator session shell. On a Linux-to-Windows connection that prevents a real Windows process from starting.

Stacked on #28122.

What

  • only synchronize legacy_fallback_cwd onto a primary local environment
  • prefer the selected environment's discovered shell for unified exec, falling back to the session shell when discovery is unavailable
  • extend the hermetic Wine test to execute Windows PowerShell in C:\windows and verify successful process lifecycle completion

Testing

  • bazel test //codex-rs/core/tests/remote_env_windows:smoke-test --test_output=errors
  • just test -p codex-protocol
  • just test -p codex-core unified_exec::tests
  • just test -p codex-core cwd_update_rewrites_sticky_environment_cwd

@anp-oai anp-oai merged commit e650ab4 into codex/turn-environment-cwd-path-uri Jun 13, 2026
29 checks passed
@anp-oai anp-oai deleted the codex/remote-environment-native-shell-cwd branch June 13, 2026 22:34
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 13, 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.

1 participant