Skip to content

v1.0.79: SDK crashes with dangerouslyAllowBrowser error on self-hosted runners #1126

@cthorpe-CLASS

Description

@cthorpe-CLASS

Description

After updating from v1.0.72 to v1.0.79, the Claude Code Action crashes immediately during initialization with the Anthropic SDK's dangerouslyAllowBrowser error. This happens on all self-hosted runners (tested on 3 separate runners). Rolling back to v1.0.72 (SDK 0.2.76) resolves the issue.

Error

SDK execution error: 53 | you can set the \`dangerouslyAllowBrowser\` option to \`true\`, e.g.,
54 | 
55 | new Anthropic({ apiKey, dangerouslyAllowBrowser: true });

error: Claude Code process exited with code 1

Environment

  • Self-hosted runners on Ubuntu 24.04 (x64)
  • Bun 1.3.6 (installed via oven-sh/setup-bun)
  • Node 22 (installed via actions/setup-node)
  • Runner version: 2.333.0
  • Auth method: OAuth token (claude_code_oauth_token)

Reproduction

  1. Pin to v1.0.79 SHA 3ac52d0da9f8ec9ca7b4dc23bb477e36ef9c77a9
  2. Trigger via @claude comment on an issue
  3. Action crashes during SDK initialization, before any Claude work begins

Working vs Broken

Version SDK Result
v1.0.72 (cd77b50) 0.2.76 Works — successful audit runs daily
v1.0.79 (3ac52d0) 0.2.84 Crashes — dangerouslyAllowBrowser

Root Cause Hypothesis

The Anthropic JS SDK's browser environment detection was tightened in a version between 0.2.76 and 0.2.84. Since the action's entrypoint runs via bun run, and Bun exposes browser-like globals (e.g., window, navigator), the SDK incorrectly identifies the runtime as a browser and refuses to run.

Workaround

Pinned to v1.0.72 (cd77b50d2b0808657f8e6774085c8bf54484351c). This blocks us from receiving security and feature updates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:installationbugSomething isn't workingp1Showstopper bug preventing substantial subset of users from using the product, or incorrect docs

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions