taTanStack
GitHubaiWorkspace
GitHub
  • CI Pipeline Executions
    • Current executionSucceeded
      667-tanstackai-event-client-generates-a-random-runtime-id-at-module-scope-crashing-on-cloudflare-workers-edge-runtimes
    • Runs and Agents
    • Configuration
    • Self-Healing CI
    • Project Graph
    • Resource Usage
    • Analysis
    • Conformance
  • Runs
    • Current runSucceeded
    • Tasks
    • Resource Usage
Insights
  • Compare tasks
  • Analytics
    fix(ai-event-client): defer devtools runtime-id generation to first use The runtime id was seeded at module scope via a top-level IIFE calling crypto.randomUUID() / Math.random(). Because @tanstack/ai's chat() always pulls in the devtools middleware, this random-value generation ran at module-evaluation time. Edge runtimes such as Cloudflare Workers forbid generating random values in global scope, so importing chat() crashed the Worker with "Disallowed operation called within global scope". Generate the runtime id lazily on first use (inside getAIDevtoolsRuntimeId() / createAIDevtoolsEventEnvelope()) and memoize it, so evaluating the module performs no random-value generation. The cross-bundle global and the generated values are unchanged. Fixes #667. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
    nx run-many --targets=build --exclude=examples/**,testing/**
Succeeded
Linux
4 CPU cores
e0413032683
3%

Cache hits

1 of 31 tasks used cache.

Get faster results

Learn how to enable distribution.

Atomizer enabled

31 groups of tasks optimized.

© 2026 - Nx Cloud

Terms of ServicePrivacy PolicyChangelogStatusDocsContact Nx CloudPricingCompany@NxDevTools