Skip to content

[pull] main from anthropics:main#94

Merged
pull[bot] merged 7 commits into
code:mainfrom
anthropics:main
May 29, 2026
Merged

[pull] main from anthropics:main#94
pull[bot] merged 7 commits into
code:mainfrom
anthropics:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 29, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

dtmeadows-ant and others added 7 commits May 29, 2026 00:07
)

## Why

The beta streaming accumulator's `compaction_delta` handler copied only
`content` onto the accumulated compaction block, silently dropping
`encrypted_content` — opaque metadata the caller must round-trip
verbatim to keep context across compaction boundaries. A streamed
message therefore lost it relative to the non-streaming response. Same
bug fixed in anthropic-python#1821 and ported to anthropic-go.

## The fix

One line in `src/lib/BetaMessageStream.ts` — carry `encrypted_content:
event.delta.encrypted_content` alongside `content` in the
`compaction_delta` case.

## Testing

Turns the shared `beta/compaction_encrypted_content` accumulator
snapshot green (verified locally with both branches combined); existing
MessageStream/BetaMessageStream suites still pass. Snapshot test lands
in the companion test PR — merge this before/with it so `next` never
goes red.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators May 29, 2026
@pull pull Bot added the ⤵️ pull label May 29, 2026
@pull pull Bot merged commit 512605f into code:main May 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant