Built-in Playwright skill fails in Codex desktop sandbox with listen EPERM during browser startup
Summary
The built-in playwright skill does not work reliably in Codex desktop's default sandboxed environment.
In this environment, Playwright CLI/MCP browser startup fails with listen EPERM: operation not permitted, which prevents opening a browser session without escalating out of the sandbox.
Given that this is an OpenAI-provided skill, the expectation is that it should work in the default Codex environment without requiring unsandboxed approval.
Environment
- Codex desktop
- macOS
- sandboxed execution enabled
- using the built-in
playwrightskill and its wrapper script:~/.codex/skills/playwright/scripts/playwright_cli.sh
Repro
- Confirm
npxis available. - Use the provided Playwright skill wrapper or the cached Playwright CLI directly.
- Redirect Playwright state into the workspace so filesystem permissions are not the issue:
PLAYWRIGHT_DAEMON_SESSION_DIR=$PWD/tmp/playwright/daemonPLAYWRIGHT_MCP_OUTPUT_DIR=$PWD/tmp/playwright/outputPLAYWRIGHT_MCP_USER_DATA_DIR=$PWD/tmp/playwright/user-data
- Run a browser-starting command such as
playwright-cli open http://localhost:3000.
Actual Result
Browser startup fails with a local socket bind error such as:
listen EPERM: operation not permitted 0.0.0.0
I also reproduced the same class of failure with plain Node inside the sandbox:
const net = require("net");
const server = net.createServer();
server.listen(0);
That fails with EPERM.
Binding explicitly to localhost also fails:
server.listen(0, "127.0.0.1");
So this is not just a 0.0.0.0 default-host issue; the sandbox appears to block local listening sockets entirely.
Expected Result
The built-in playwright skill should work in Codex desktop's default sandbox, or Codex should provide a supported sandbox-safe transport for Playwright browser startup.
Notes
- Moving Playwright session/cache/output paths into the workspace fixed file-permission problems, but not browser startup.
- The remaining blocker appears to be that Playwright CLI/MCP requires a local
listen()during launch, and Codex desktop sandbox disallows it. - Chromium specifically appears to hit a path that allocates a local CDP port during launch, but even plain local
net.createServer().listen(...)is blocked in this sandbox.
Impact
This makes the built-in playwright skill effectively unusable in the default sandboxed Codex desktop environment, forcing repeated unsandboxed approvals for a first-party workflow.
Related
- openai/codex#2508
- microsoft/playwright#36412
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗