Repository navigation
fix(claude-code): Oxc node path, fresh-volume start, Hugo-proof safe.directory; Playwright MCP via env vars - #237
Merged
Conversation
This was referenced Oct 22, 2026
…afe.directory, cf workers note - Set oxc.path.node in both variants: Oxc starts oxfmt/oxlint with the PATH from `$SHELL -ilc env`, which can lack node (#228). - patch-playwright-mcp exits 0 when ~/.claude/plugins/cache doesn't exist yet, so postStartCommand no longer fails on a fresh volume (#207). - Trust /workspace in /etc/gitconfig instead of a GIT_CONFIG_* env var. Hugo >= 0.166 strips the env var before it runs git (#211). - README: `cf workers …` still needs the deleted workerd, even for API reads (#212). - CI verify runs patch-playwright-mcp on a fresh container and checks the system safe.directory. Closes #228, closes #207, closes #211
…cp.json rewrites @playwright/mcp reads every CLI option from a PLAYWRIGHT_MCP_* variable, and Claude Code starts stdio MCP servers with its own environment. The image now sets PLAYWRIGHT_MCP_BROWSER, _EXECUTABLE_PATH and _HEADLESS, so the plugin's .mcp.json stays as upstream ships it and plugin auto-updates can't undo the configuration (#64, #85, #87, #98). The chromium channel already runs without Chromium's sandbox on Linux, so --no-sandbox needs no replacement. Probe: in the claude-code image, `npx @playwright/mcp@latest` with no args (as the plugin starts it) navigated with the three vars set, and failed with "Chromium distribution 'chrome' is not found" without them. Removed: the jq rewrite of every cached .mcp.json, its SessionStart hook, the postStartCommand and init-plugins.sh calls, and ralphex-fe's copy of the rewrite in init-docker.sh. This also supersedes the fresh-volume guard for #207. /usr/local/bin/patch-playwright-mcp stays as a no-op until 2027-01-31 so downstream projects that still call it don't fail; the README says how to drop the calls.
…y metadata out of cf deploys Hugo didn't start filtering env in 0.166: its git calls go through the exec helper, which passes only variables matching security.exec.osEnv, and that default has no GIT_* pattern in 0.165, 0.166 or 0.168. The fix (#211) was right; the comment and README now give the actual reason. cf 1.0.0-beta.15 added CLOUDFLARE_DEPENDENCIES_INSTRUMENTATION=false, which omits npm dependency metadata from Worker deploys. It sits with the image's other telemetry opt-outs.
gatezh
force-pushed
the
fix/claude-code-issue-batch
branch
from
October 22, 2026 22:45
c03fc24 to
71fbd7f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes three claude-code template bugs (#228, #207, #211), corrects the README on
cfandworkerd(#212), and configures the Playwright MCP plugin through environment variables instead of rewriting its.mcp.json.Why
nodeonPATH, so format-on-save and linting silently do nothing.~/.claudevolume madepostStartCommandfail on first open, becausepatch-playwright-mcpexited 1 with no plugin cache.GIT_CONFIG_*before it runs git: its exec helper passes only variables matchingsecurity.exec.osEnv, which has noGIT_*pattern. That undid thesafe.directoryfix from fix(claude-code): set git safe.directory and gh credential helper via env #203.workerd.cf workers …does.@playwright/mcpreads every CLI option from aPLAYWRIGHT_MCP_*variable, and Claude Code starts stdio MCP servers with its own environment. The jq rewrite of every cached.mcp.json, re-run frompostStartCommand,init-plugins.shand a SessionStart hook because plugin updates kept undoing it (fix(claude-code): Playwright MCP plugin fails on ARM64 — chrome not found #64, Playwright MCP plugin can't launch a browser inclaude-code-sandbox, and the existing ARM64 patch is broken inclaude-codetoo #85, Bakepatch-playwright-mcp.shinto the image so consumer projects don't carry a copy #87, [BUG] patch-playwright-mcp misses mid-session plugin cache updates #98), was never needed.Changes
"oxc.path.node": "/usr/local/bin/node"(oxc-vscode 1.64.1 setting).git config --systemin the Dockerfile. It's removed fromcontainerEnv, soGIT_CONFIG_COUNTgoes from 4 to 3.PLAYWRIGHT_MCP_BROWSER=chromium,PLAYWRIGHT_MCP_EXECUTABLE_PATH=/usr/bin/chromiumandPLAYWRIGHT_MCP_HEADLESS=true. The chromium channel already runs without Chromium's sandbox on Linux, so--no-sandboxneeds no replacement.postStartCommandandinit-plugins.shcalls, and ralphex-fe's copy of the rewrite ininit-docker.sh. This also covers [BUG] patch-playwright-mcp exits 1 on a fresh ~/.claude volume, failing postStartCommand #207./usr/local/bin/patch-playwright-mcp, until 2027-01-31, so downstream projects whosepostStartCommandorinit-plugins.sh(underset -e) still call it don't fail. The README says how to drop the calls.cf workers …as needingworkerd([BUG] cf workers API commands need the deleted workerd #212).CLOUDFLARE_DEPENDENCIES_INSTRUMENTATION=false(cf 1.0.0-beta.15) beside the telemetry opt-outs, so Worker deploys omit npm dependency metadata.verify-image.shchecks the systemsafe.directory, the threePLAYWRIGHT_MCP_*values and the cf variable, and runs the no-op. Both ralphex-fe verify steps checkPLAYWRIGHT_MCP_EXECUTABLE_PATH.Notes
npx @playwright/mcp@lateststarted with no args, as the plugin starts it, navigated a page in the claude-code image with the three variables set. Without them it failed with "Chromium distribution 'chrome' is not found". With the stack built, the same probe passes in claude-code and in ralphex-fe (asapp) on the baked environment alone.env -i, as Hugo does),git statuson a foreign-owned/workspaceworks, while:latestreports dubious ownership.cf workers …API commands fail without workerd: workers module statically imports miniflare cloudflare/cf#390).Closes #228
Closes #207
Closes #211
Refs #212