Skip to content

fix(sandboxing): reject WSL1 bubblewrap sandboxing#17559

Merged
viyatb-oai merged 4 commits intomainfrom
codex/viyatb/wsl1-bubblewrap-unsupported
Apr 12, 2026
Merged

fix(sandboxing): reject WSL1 bubblewrap sandboxing#17559
viyatb-oai merged 4 commits intomainfrom
codex/viyatb/wsl1-bubblewrap-unsupported

Conversation

@viyatb-oai
Copy link
Copy Markdown
Collaborator

@viyatb-oai viyatb-oai commented Apr 12, 2026

Summary

  • detect WSL1 before Codex probes or invokes the Linux bubblewrap sandbox
  • fail early with a clear unsupported-operation message when a command would require bubblewrap on WSL1
  • document that WSL2 follows the normal Linux bubblewrap path while WSL1 is unsupported

Why

Codex 0.115.0 made bubblewrap the default Linux sandbox. WSL1 cannot create the user namespaces that bubblewrap needs, so shell commands currently fail later with a raw bwrap namespace error. This makes the unsupported environment explicit and keeps non-bubblewrap paths unchanged.

The WSL detection reads /proc/version, lets an explicit WSL marker decide WSL1 vs WSL2+, and only treats a bare Microsoft marker as WSL1 when no explicit WSL version is present.

addresses #16076

Co-authored-by: Codex <noreply@openai.com>
@viyatb-oai viyatb-oai changed the title [codex] Reject WSL1 bubblewrap sandboxing feat: reject WSL1 bubblewrap sandboxing Apr 12, 2026
@viyatb-oai viyatb-oai changed the title feat: reject WSL1 bubblewrap sandboxing fix(sandboxing): reject WSL1 bubblewrap sandboxing Apr 12, 2026
viyatb-oai and others added 2 commits April 12, 2026 12:08
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex noreply@openai.com
@viyatb-oai viyatb-oai marked this pull request as ready for review April 12, 2026 20:11
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

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: c3c281a133

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/sandboxing/src/bwrap.rs Outdated
Co-authored-by: Codex noreply@openai.com
@viyatb-oai viyatb-oai merged commit cb870a1 into main Apr 12, 2026
22 checks passed
@viyatb-oai viyatb-oai deleted the codex/viyatb/wsl1-bubblewrap-unsupported branch April 12, 2026 21:08
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 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