Skip to content

app-server: preserve target-native environment cwd#28146

Merged
anp-oai merged 15 commits into
mainfrom
codex/app-server-remote-environment-cwd
Jun 16, 2026
Merged

app-server: preserve target-native environment cwd#28146
anp-oai merged 15 commits into
mainfrom
codex/app-server-remote-environment-cwd

Conversation

@anp-oai

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

Copy link
Copy Markdown
Collaborator

Why

app-server may run on a different OS from the selected exec-server environment. Parsing that environment’s cwd with the Codex host’s path rules prevents thread startup.

What

Carry environment cwd values as LegacyAppPathString at the app-server boundary and PathUri internally. Existing tool-call schemas and relative-path behavior stay host-native; remaining local-only consumers convert explicitly and leave follow-up TODOs.

The Wine integration test verifies app-server can start a thread and complete an ordinary turn with a Windows environment cwd from Linux.

Validation

  • bazel test //codex-rs/core/tests/remote_env_windows:smoke-test --test_output=errors
  • focused app-server environment-selection and protocol schema tests
  • scoped Clippy for codex-core and codex-app-server-protocol

@anp-oai anp-oai force-pushed the codex/app-server-remote-environment-cwd branch from 2ea8378 to 0899d52 Compare June 14, 2026 02:08
@@ -3844,27 +3852,6 @@ fn turn_start_params_treat_null_or_omitted_environments_as_default() {
);
}

#[test]

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.

for human reviewers: this layer can't enforce that absolute paths are required anymore, this is moved to a thread start test

Comment thread codex-rs/app-server/tests/suite/v2/thread_start.rs
Comment thread codex-rs/app-server/README.md Outdated
Comment thread codex-rs/core/src/environment_selection.rs Outdated
Comment thread codex-rs/core/tests/remote_env_windows/remote_env_windows_test.rs Outdated
anp-oai added a commit that referenced this pull request Jun 14, 2026
Comment thread codex-rs/core/tests/remote_env_windows/remote_env_windows_test.rs Outdated
@anp-oai anp-oai marked this pull request as ready for review June 14, 2026 03:20
@anp-oai anp-oai requested a review from a team as a code owner June 14, 2026 03:20
@anp-oai anp-oai marked this pull request as draft June 14, 2026 03:20
@anp-oai anp-oai removed the request for review from a team June 14, 2026 03:20

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 167b3b9a5a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/exec-server/src/protocol.rs
Comment thread codex-rs/core/src/session/turn_context.rs Outdated
Comment thread codex-rs/app-server-protocol/Cargo.toml
@anp-oai anp-oai force-pushed the codex/cross-platform-path-rendering branch from 3971173 to b19077b Compare June 14, 2026 05:09
Base automatically changed from codex/cross-platform-path-rendering to main June 14, 2026 05:26
anp-oai added a commit that referenced this pull request Jun 14, 2026
@anp-oai anp-oai force-pushed the codex/app-server-remote-environment-cwd branch 2 times, most recently from 5baa76a to e22628c Compare June 15, 2026 23:34
@anp-oai anp-oai marked this pull request as ready for review June 15, 2026 23:35
@anp-oai

anp-oai commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e22628cbbe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/core/tests/remote_env_windows/remote_env_windows_test.rs Outdated
Comment thread codex-rs/core/src/session/turn_context.rs Outdated
Comment thread codex-rs/core/src/thread_manager_tests.rs Outdated
anp-oai added a commit that referenced this pull request Jun 16, 2026
## Why

In #28146 I missed the invariant that an absolute `exec_command` workdir
must override the environment cwd. The existing integration test would
have caught that regression, but it was ignored as flaky.

## What

Re-enable `unified_exec_respects_workdir_override`.

## Validation

`just test -p codex-core unified_exec_respects_workdir_override`
@anp-oai anp-oai force-pushed the codex/app-server-remote-environment-cwd branch from b6c0886 to be6caaa Compare June 16, 2026 21:15
@anp-oai anp-oai enabled auto-merge (squash) June 16, 2026 21:17
@anp-oai anp-oai force-pushed the codex/app-server-remote-environment-cwd branch from be6caaa to fa970c1 Compare June 16, 2026 21:34
@anp-oai anp-oai merged commit f8850ca into main Jun 16, 2026
31 checks passed
@anp-oai anp-oai deleted the codex/app-server-remote-environment-cwd branch June 16, 2026 21:42
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants