Hi!
I’m really happy there’s a Codex CLI topic now - I have a huuuge list of questions Starting with the first one: when I use Codex CLI, it often tells me that it cannot use the browser, which is very limiting for me. Example:
I didn’t run the test harness here since I can’t open the browser, so you’ll be the source of truth for the numbers.
However, I’m pretty sure there’s a way to let it use it. Do you have any suggestions? I installed npm install -g @playwright/cli@latest but apparently there are no Playwright skills for Codex, only for Claude Code or GitHub Copilot. I would include the link to the Playwright-cli repo, but the forum is telling me that I cannot include links….
1 Like
EricGT
February 2, 2026, 11:19pm
2
Good qeustion.
Note: I have never used playwright or used an AI to control or access a browser, just trying to help.
Checked the Issues both open and closed
For example:
opened 04:48AM - 03 Oct 25 UTC
closed 04:51PM - 25 Dec 25 UTC
bug
mcp
### What version of Codex is running?
codex-cli 0.42.0
### Which model were yo… u using?
gpt-5-codex
### What platform is your computer?
Linux 6.8.0-84-generic x86_64 x86_64 (Linux Mint 22.1)
### What steps can reproduce the bug?
1. Start a codex exec session on Linux Mint 22.1 with Codex CLI 0.42.0 inside a project directory.
2. Ensure the Playwright MCP (npx @playwright/mcp@latest) is registered; then ask the Codex agent to open any URL
via browser_navigate, e.g., http://localhost:3000.
3. Observe that Codex returns DOM snapshots/logs, but no GUI browser window is rendered on the desktop.
4. Run the same URL locally via npx playwright test --headed (or npx playwright codegen) on the same machine; note
that a Chromium window appears immediately, proving the local environment supports headful Playwright.
### What is the expected behavior?
Codex only returns textual snapshots and never launches a visible window;
### What do you see instead?
Codex only returns textual snapshots and never launches a visible window; system process lists and window managers
show no Chromium/Firefox instance tied to the user session, even though manual headed runs work.
### Additional information
The MCP list shows the Playwright server as npx @playwright/mcp@latest. Playwright MCP Bridge is installed,
but Codex sessions still stay headless. Other agents (e.g., Claude Code) on the same machine can spawn headed
Playwright sessions, so the limitation seems specific to Codex MCP.
by simonegiacomelli (Simone) · GitHub
Just for reference, below the excerpt that fixed the issue for me.
Pertinent section from ~/.codex/config.toml:
[mcp_servers.playwright]
command = "npx"
args = ["@playwright/mcp@latest"]
env_vars = ["DISPLAY", "WAYLAND_DISPLAY", "XAUTHORITY", "XDG_RUNTIME_DIR"]
HTH
FYI for others
3 Likes
vb
February 3, 2026, 12:08am
3
Hi!
You can install the Playwright skill right inside the Codex CLI by using the /skills slash command and then following the decision tree.
/skills
1. List skills
skill-installer
19. playwright
3 Likes
I like this! Will try today and let you know how it goes.
EDIT: I followed your suggestion and it worked flawlessly! And it tastes even better when served with GPT-5.3-Codex man, do you guys cook!!
2 Likes