-
Notifications
You must be signed in to change notification settings - Fork 1.7k
v1.0.79: SDK crashes with dangerouslyAllowBrowser error on self-hosted runners #1126
Copy link
Copy link
Open
Labels
area:installationbugSomething isn't workingSomething isn't workingp1Showstopper bug preventing substantial subset of users from using the product, or incorrect docsShowstopper bug preventing substantial subset of users from using the product, or incorrect docs
Description
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
- Pin to v1.0.79 SHA
3ac52d0da9f8ec9ca7b4dc23bb477e36ef9c77a9 - Trigger via
@claudecomment on an issue - 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:installationbugSomething isn't workingSomething isn't workingp1Showstopper bug preventing substantial subset of users from using the product, or incorrect docsShowstopper bug preventing substantial subset of users from using the product, or incorrect docs