codex - 💡(How to fix) Fix Playwright Chromium fails in Codex Desktop macOS sandbox with MachPortRendezvousServer permission denied [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#21292Fetched 2026-05-07 03:42:36
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

Error Message

exception while trying to kill process: Error: kill EPERM

Root Cause

Browser-game/frontend verification flows in Codex Desktop often need Playwright for screenshots, console checks, and canvas/WebGL smoke tests. On macOS, the default sandbox currently makes that workflow fail in a way that looks like a Chromium/Playwright crash rather than an actionable Codex permission boundary.

Fix Action

Workaround

Use an escalated shell command for Playwright browser QA, or avoid launching Chromium from sandboxed tool runtimes such as the Node REPL MCP. A more durable workaround is to create a scoped script like npm run browser:smoke and approve that command prefix.

Code Example

FATAL:base/apple/mach_port_rendezvous_mac.cc:159
Check failed: kr == KERN_SUCCESS.
bootstrap_check_in org.chromium.Chromium.MachPortRendezvousServer.<pid>: Permission denied (1100)

---

node -e '(async()=>{const {chromium}=require("playwright");const browser=await chromium.launch({headless:true});const page=await browser.newPage();await page.goto("data:text/html,<title>ok</title>");console.log(await page.title());await browser.close();})().catch(e=>{console.error(String(e.message||e).split("\n").slice(0,10).join("\n"));process.exit(1);});'

---

const { chromium } = await import('playwright');
const browser = await chromium.launch({ headless: true });

---

[err] FATAL:base/apple/mach_port_rendezvous_mac.cc:159
bootstrap_check_in org.chromium.Chromium.MachPortRendezvousServer.<pid>: Permission denied (1100)

---

exception while trying to kill process: Error: kill EPERM
RAW_BUFFERClick to expand / collapse

What version of Codex is running?

  • Codex CLI: 0.116.0
  • Codex Desktop app: unknown from the agent session

What platform is your computer?

  • macOS 26.4.1 (25E253)
  • Apple Silicon / arm64
  • Node.js v25.8.1
  • Playwright 1.59.1

What issue are you seeing?

When Codex Desktop runs a local Playwright Chromium launch inside the default sandboxed command/runtime path, Chromium crashes during startup with a macOS Mach bootstrap permission error:

FATAL:base/apple/mach_port_rendezvous_mac.cc:159
Check failed: kr == KERN_SUCCESS.
bootstrap_check_in org.chromium.Chromium.MachPortRendezvousServer.<pid>: Permission denied (1100)

This prevents browser QA / screenshot smoke tests from running through sandboxed shell commands and through a Node REPL MCP/tool runtime. The same Playwright script works when run through Codex with escalated permissions.

Steps to reproduce

From a Codex Desktop session on macOS, in a local project that has Playwright installed:

node -e '(async()=>{const {chromium}=require("playwright");const browser=await chromium.launch({headless:true});const page=await browser.newPage();await page.goto("data:text/html,<title>ok</title>");console.log(await page.title());await browser.close();})().catch(e=>{console.error(String(e.message||e).split("\n").slice(0,10).join("\n"));process.exit(1);});'

Observed in the normal sandboxed command path: Chromium launches, then immediately exits/crashes with the MachPortRendezvousServer Permission denied (1100) error above.

Also reproduced via a Node REPL MCP/tool runtime using:

const { chromium } = await import('playwright');
const browser = await chromium.launch({ headless: true });

What did you expect to happen?

Codex should either:

  • allow Chromium/Playwright to start successfully in an approved browser/test context, or
  • detect this macOS sandbox failure and prompt for escalation with a clear message, or
  • route browser automation through a Codex-supported browser tool path.

What happened instead?

Chromium fails inside the sandbox with:

[err] FATAL:base/apple/mach_port_rendezvous_mac.cc:159
bootstrap_check_in org.chromium.Chromium.MachPortRendezvousServer.<pid>: Permission denied (1100)

In some full Chrome for Testing launch variants, Playwright reports the browser closed and then has trouble killing the process from inside the sandbox:

exception while trying to kill process: Error: kill EPERM

Additional testing

These variants were tried and did not resolve the sandboxed failure:

  • default Playwright Chromium headless shell
  • full chromium.executablePath() / Chrome for Testing
  • channel: 'chromium'
  • args: ['--disable-features=MachPortRendezvous']
  • args: ['--disable-features=DialMediaRouteProvider,MediaRouter']

The same kind of Playwright launch succeeds when Codex runs the command with escalated permissions outside the sandbox.

Workaround

Use an escalated shell command for Playwright browser QA, or avoid launching Chromium from sandboxed tool runtimes such as the Node REPL MCP. A more durable workaround is to create a scoped script like npm run browser:smoke and approve that command prefix.

Why this matters

Browser-game/frontend verification flows in Codex Desktop often need Playwright for screenshots, console checks, and canvas/WebGL smoke tests. On macOS, the default sandbox currently makes that workflow fail in a way that looks like a Chromium/Playwright crash rather than an actionable Codex permission boundary.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING