Skip to content

app-server: require absolute cwd for windowsSandbox/setupStart#13833

Merged
iceweasel-oai merged 1 commit intomainfrom
dev/iceweasel/absolute-paths-only-for-cwd
Mar 7, 2026
Merged

app-server: require absolute cwd for windowsSandbox/setupStart#13833
iceweasel-oai merged 1 commit intomainfrom
dev/iceweasel/absolute-paths-only-for-cwd

Conversation

@iceweasel-oai
Copy link
Collaborator

Summary

  • require windowsSandbox/setupStart.cwd to be an AbsolutePathBuf
  • reject relative cwd values at request parsing instead of normalizing them later in the setup flow
  • add RPC-layer coverage for relative cwd rejection and update the checked-in protocol schemas/docs

Why

windowsSandbox/setupStart was carrying the client-provided cwd as a raw PathBuf for command_cwd while config derivation normalized the same value into an absolute policy_cwd.

That left room for relative-path ambiguity in the setup path, especially for inputs like cwd: "repo". Making the RPC accept only absolute paths removes that split entirely: the handler now receives one already-validated absolute path and uses it for both config derivation and setup.

This keeps the trust model unchanged. Trusted clients could already choose the session cwd; this change is only about making the setup RPC reject relative paths so command_cwd and policy_cwd cannot diverge.

Testing

  • cargo test -p codex-app-server windows_sandbox_setup (run locally by user)
  • cargo test -p codex-app-server-protocol windows_sandbox (run locally by user)

@iceweasel-oai iceweasel-oai merged commit 4b4f61d into main Mar 7, 2026
29 of 30 checks passed
@iceweasel-oai iceweasel-oai deleted the dev/iceweasel/absolute-paths-only-for-cwd branch March 7, 2026 06:47
@github-actions github-actions bot locked and limited conversation to collaborators Mar 7, 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.

2 participants