A focused SDK reliability contribution showing that constructor-derived User-Agent names drift under subclassing or minification. Anthropic closed the PR after shipping the same fix and regression scenario in v0.116.0.
Role
Category
SDK Reliability
Engineering discipline
UPSTREAM SHIPPED

Patrick Ribbsaeter · Independent open-source contribution
Engineering objective
The SDK generated its User-Agent from constructor.name. Subclassing or JavaScript minification can rename that constructor, producing unstable client identity in network traffic and weakening observability across builds.
Constraints
Approach
Demonstrated the failure with a subclass whose constructor name differs from the canonical SDK name.
Specified a stable Anthropic/JS versioned token independent of runtime class names.
Added a regression that rejects leaked subclass names while preserving the public header format.
Validated the focused Jest suite, formatting, linting, and TypeScript compilation.
Workflow
Technical validation
Observable engineering evidence. Discipline: UPSTREAM SHIPPED
Anthropic release
SDK v0.116.0
Public contribution
PR #1135 · closed
Focused tests
51 passed
Outcome boundary
Shipped independently
Public evidence
Outcome
Anthropic confirmed that the same fix shipped in SDK v0.116.0
The released implementation included regression coverage for the subclass/minified-name scenario
The focused Jest run passed all 51 tests alongside lint, format, and TypeScript checks
PR #1135 was closed without merge because upstream had already shipped the correction
Technologies
Next engineering system
CLAUDE AGENT SDK · MERGED OPEN SOURCE
Have an ambitious AI system to build?
I work across AI architecture, product engineering, private inference, automation, SaaS infrastructure, and production hardening.