Skip to content

fix(claude-code): Oxc node path, fresh-volume start, Hugo-proof safe.directory; Playwright MCP via env vars - #237

Merged
gatezh merged 4 commits into
feat/remove-rtkfrom
fix/claude-code-issue-batch
Oct 22, 2026
Merged

gatezh merged 4 commits into
feat/remove-rtkfrom
fix/claude-code-issue-batch

Conversation

@gatezh

@gatezh gatezh commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

What

Fixes three claude-code template bugs (#228, #207, #211), corrects the README on cf and workerd (#212), and configures the Playwright MCP plugin through environment variables instead of rewriting its .mcp.json.

Why

Changes

  • Oxc: both variants set "oxc.path.node": "/usr/local/bin/node" (oxc-vscode 1.64.1 setting).
  • safe.directory: git config --system in the Dockerfile. It's removed from containerEnv, so GIT_CONFIG_COUNT goes from 4 to 3.
  • Playwright MCP:
    • Image variables: both images set PLAYWRIGHT_MCP_BROWSER=chromium, PLAYWRIGHT_MCP_EXECUTABLE_PATH=/usr/bin/chromium and PLAYWRIGHT_MCP_HEADLESS=true. The chromium channel already runs without Chromium's sandbox on Linux, so --no-sandbox needs no replacement.
    • Removed: the rewrite script, its SessionStart hook, the postStartCommand and init-plugins.sh calls, and ralphex-fe's copy of the rewrite in init-docker.sh. This also covers [BUG] patch-playwright-mcp exits 1 on a fresh ~/.claude volume, failing postStartCommand #207.
    • Kept as a no-op: /usr/local/bin/patch-playwright-mcp, until 2027-01-31, so downstream projects whose postStartCommand or init-plugins.sh (under set -e) still call it don't fail. The README says how to drop the calls.
  • cf:
  • CI: verify-image.sh checks the system safe.directory, the three PLAYWRIGHT_MCP_* values and the cf variable, and runs the no-op. Both ralphex-fe verify steps check PLAYWRIGHT_MCP_EXECUTABLE_PATH.

Notes

Closes #228
Closes #207
Closes #211
Refs #212

…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
gatezh force-pushed the fix/claude-code-issue-batch branch from c03fc24 to 71fbd7f Compare October 22, 2026 22:45
@gatezh
gatezh changed the base branch from master to feat/remove-rtk October 22, 2026 22:45
@gatezh gatezh changed the title fix(claude-code): Oxc node path, fresh-volume postStart, Hugo-proof safe.directory, cf workers note fix(claude-code): Oxc node path, fresh-volume start, Hugo-proof safe.directory; Playwright MCP via env vars Oct 22, 2026
@gatezh
gatezh added this pull request to stack #244 October 22, 2026 22:46
@gatezh
gatezh merged commit e4fbd28 into master Oct 22, 2026
20 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant