Skip to content

[codex] preserve explicit environment cwd#27995

Merged
pakrym-oai merged 1 commit into
mainfrom
pakrym/full-ci-delete-primary-environment-cwd-override
Jun 15, 2026
Merged

[codex] preserve explicit environment cwd#27995
pakrym-oai merged 1 commit into
mainfrom
pakrym/full-ci-delete-primary-environment-cwd-override

Conversation

@pakrym-oai

Copy link
Copy Markdown
Contributor

Why

TurnEnvironmentSelections::new rewrote the primary environment's explicit cwd to the legacy fallback cwd. For a remote-first selection, this could replace the remote working directory with a local fallback path and made the legacy cwd overlay authoritative over environment-owned state.

What changed

  • Preserve every explicit environment cwd when constructing turn environment selections.
  • Keep cwd-only app-server updates compatible by rebuilding the default environment selections at the requested cwd.
  • Cover both explicit primary cwd preservation and cwd-only updates reaching the model-visible execution environment.

Testing

  • just test -p codex-core session_update_settings_does_not_rewrite_sticky_environment_cwds
  • just test -p codex-core environment_settings_preserve_explicit_primary_cwd
  • just test -p codex-app-server thread_settings_update_cwd_retargets_default_environment

@pakrym-oai
pakrym-oai marked this pull request as ready for review June 13, 2026 01:08
@pakrym-oai
pakrym-oai requested a review from a team as a code owner June 13, 2026 01:08

@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: 0b69f15b73

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread codex-rs/app-server/src/request_processors/turn_processor.rs

@anp-oai anp-oai 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.

LGTM, looks like this ate some bitrot and CI is unhappy but presumably an easy fix

@pakrym-oai
pakrym-oai force-pushed the pakrym/full-ci-delete-primary-environment-cwd-override branch from 3ab3ee2 to b45c72c Compare June 15, 2026 16:59
@pakrym-oai
pakrym-oai force-pushed the pakrym/full-ci-delete-primary-environment-cwd-override branch from b45c72c to b36c87b Compare June 15, 2026 17:04
@pakrym-oai
pakrym-oai enabled auto-merge (squash) June 15, 2026 17:11
@pakrym-oai
pakrym-oai merged commit bd4fe31 into main Jun 15, 2026
56 of 61 checks passed
@pakrym-oai
pakrym-oai deleted the pakrym/full-ci-delete-primary-environment-cwd-override branch June 15, 2026 17:17
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 15, 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.

3 participants