Skip to content

Tie Linux sandbox proxy bridges to the launcher lifetime - #61898

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

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

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Tie Linux sandbox proxy bridges to the launcher lifetime

Why

Host proxy bridges must close active connections when a sandbox exits or is cancelled. Proxy descriptor exhaustion must also leave synthetic mount cleanup able to run.

What changed

  • Run host proxy bridges as threads in an outer supervisor that forwards signals and preserves the sandbox command's exit status. Use parent-death signals to terminate supervised children when their parent exits.
  • Give bridge routes private descriptor tables where supported, retry accepts after descriptor exhaustion, and keep mount cleanup in a separate supervisor.
  • Create the transparent TCP namespace in the bubblewrap child after re-executing the sandbox helper, clearing inherited credentials from memory and restoring dumpability for user namespace ID mapping.

Testing

Add regression tests for bridge teardown after normal exit, process-group cancellation, launcher termination, and caller-thread exit; exit status propagation with inherited SIGCHLD ignored; and SOCKS connectivity and synthetic mount cleanup under descriptor pressure.

## Why

Host proxy bridges must close active connections when a sandbox exits or is cancelled. Proxy descriptor exhaustion must also leave synthetic mount cleanup able to run.

## What changed

- Run host proxy bridges as threads in an outer supervisor that forwards signals and preserves the sandbox command's exit status. Use parent-death signals to terminate supervised children when their parent exits.
- Give bridge routes private descriptor tables where supported, retry accepts after descriptor exhaustion, and keep mount cleanup in a separate supervisor.
- Create the transparent TCP namespace in the bubblewrap child after re-executing the sandbox helper, clearing inherited credentials from memory and restoring dumpability for user namespace ID mapping.

## Testing

Add regression tests for bridge teardown after normal exit, process-group cancellation, launcher termination, and caller-thread exit; exit status propagation with inherited `SIGCHLD` ignored; and SOCKS connectivity and synthetic mount cleanup under descriptor pressure.

GitOrigin-RevId: dd297af98e9383942098fab5683ef2474c5ae554
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/dd297af98e9383942098fab5683ef2474c5ae554 branch from f6b7626 to 641b4ca Compare November 16, 2026 22:28
@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-16T22:28:07.336741Z f6b7626 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 641b4ca into main Nov 16, 2026
10 of 23 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/dd297af98e9383942098fab5683ef2474c5ae554 branch November 16, 2026 22:28
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 16, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — 641b4cac Deployed Nov 16, 2026 by ohong via Identify potential duplicates (open issues fallback) #63865
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