You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Preserve Promise subclass return values in wrapPromise
When a function returns a Promise subclass (e.g. Anthropic SDK's
APIPromise, which adds a .withResponse() method), returning
promise.then(cb) replaces it with a plain Promise, losing any
methods on the subclass.
Following Node.js core diagnostics_channel behaviour: chain normally
for native Promise instances, and for subclasses or other thenables,
side-chain .then() for the async channel callbacks and return the
original promise.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments