Skip to content

core: render remote environment cwd natively#28152

Draft
anp-oai wants to merge 2 commits into
codex/app-server-remote-environment-cwdfrom
codex/remote-windows-path-requirements
Draft

core: render remote environment cwd natively#28152
anp-oai wants to merge 2 commits into
codex/app-server-remote-environment-cwdfrom
codex/remote-windows-path-requirements

Conversation

@anp-oai

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

Copy link
Copy Markdown
Collaborator

Why

When app-server runs on Linux while the selected execution environment runs Windows, the model-visible <environment_context> renders the selected cwd using Linux host syntax, such as /C:/windows. This gives the model a path spelling that does not match the environment where commands actually execute.

Stacked on #28146.

What

  • Keep selected environment cwd values as PathUri while building environment context.
  • Render cwd text using the path convention represented by the URI, with the canonical URI as a fallback.
  • Preserve compatibility with legacy TurnContextItem.cwd values when reconstructing and diffing context.
  • Extend the Wine-backed remote Windows test to assert that the model sees powershell and C:\windows.
  • Record the remaining host workspace-root projection with a TODO(anp) follow-up.

Testing

  • just test -p codex-core context::environment_context::tests
  • bazel test //codex-rs/core/tests/remote_env_windows:smoke-test --test_output=errors

@anp-oai anp-oai force-pushed the codex/remote-windows-path-requirements branch from 3fc8e16 to b91a6db Compare June 14, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant