Skip to content

Preserve native sandbox executable paths and PTY dispatch names - #61910

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/6a2af0486220d98195f5d67fde2597e3c4515e11
Nov 16, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/6a2af0486220d98195f5d67fde2597e3c4515e11

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Preserve native sandbox executable paths and PTY dispatch names

Why

Sandbox helpers with non-UTF-8 paths can lose their exact executable path when converted into command requests. PTY launches with a custom argv[0] can also try to execute the dispatch name instead of the configured program.

What changed

  • Carry native executable paths through sandbox requests, local execution, shell snapshots, and sandbox integrity checks.
  • Use native Unix PTY spawning when argv[0] differs from the executable, preserving the dispatch name and controlling terminal setup.
  • Preserve PTY executable lookup through the child environment's PATH and fallback to its home directory when the requested working directory is missing.

Testing

Add regression coverage for non-UTF-8 sandbox helper paths, PTY dispatch names, child HOME/PATH lookup, controlling terminals, and exit-code preservation.

## Why

Sandbox helpers with non-UTF-8 paths can lose their exact executable path when converted into command requests. PTY launches with a custom `argv[0]` can also try to execute the dispatch name instead of the configured program.

## What changed

- Carry native executable paths through sandbox requests, local execution, shell snapshots, and sandbox integrity checks.
- Use native Unix PTY spawning when `argv[0]` differs from the executable, preserving the dispatch name and controlling terminal setup.
- Preserve PTY executable lookup through the child environment's `PATH` and fallback to its home directory when the requested working directory is missing.

## Testing

Add regression coverage for non-UTF-8 sandbox helper paths, PTY dispatch names, child `HOME`/`PATH` lookup, controlling terminals, and exit-code preservation.

GitOrigin-RevId: 6a2af0486220d98195f5d67fde2597e3c4515e11
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/6a2af0486220d98195f5d67fde2597e3c4515e11 branch from d1a3240 to c9df641 Compare November 16, 2026 23:27
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor
Codex Review Summary: 🔄 Running

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-16T23:27:08.953647Z d1a3240 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot merged commit c9df641 into main Nov 16, 2026
10 of 24 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/6a2af0486220d98195f5d67fde2597e3c4515e11 branch November 16, 2026 23:27
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 16, 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