Skip to content

[BUG] patch-playwright-mcp exits 1 on a fresh ~/.claude volume, failing postStartCommand #207

Closed

Description

@gatezh

Summary

/usr/local/bin/patch-playwright-mcp exits 1 on a fresh ~/.claude volume, so the default variant's postStartCommand fails on every first open (VS Code shows "postStartCommand from devcontainer.json failed"). Before init-plugins.sh has run, ~/.claude/plugins/cache does not exist; find exits 1, and under set -euo pipefail the pipeline's status fails the script. 2>/dev/null hides the message but not the exit code.

Reproduction

  1. Copy the claude-code template into a project; open the default variant with no existing *-claude-config-* volume.
  2. Lifecycle: updateContentCommand succeeds, then:
postStartCommand from devcontainer.json failed with exit code 1. Skipping any further user-provided commands.
Error: Command failed: /bin/sh -c /usr/local/bin/patch-playwright-mcp

Verification

$ /usr/local/bin/patch-playwright-mcp; echo "exit=$?"
exit=1
$ mkdir -p ~/.claude/plugins/cache && /usr/local/bin/patch-playwright-mcp; echo "exit=$?"
exit=0

Suggested fix

+[ -d "$HOME/.claude/plugins/cache" ] || exit 0
+
 find "$HOME/.claude/plugins/cache" -path "*/playwright*/.mcp.json" 2>/dev/null \

Affected files in this repo

  • claude-code/.devcontainer/patch-playwright-mcp.sh:25

Related

  • Sandbox variant usually escapes it because init-plugins.sh in postCreateCommand creates the cache first; it still fails if every plugin install fails.
  • Workaround downstream: mkdir -p /home/node/.claude/plugins/cache in updateContentCommand / postCreateCommand.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions