Skip to content

Conversation

@tmsdnl
Copy link
Contributor

@tmsdnl tmsdnl commented Nov 21, 2025

Fixes #1

The Claude API now returns stream events wrapped in a structure with type: 'stream_event' and an event property. This change extracts the actual event from the wrapper before processing, ensuring proper handling of content_block_delta, tool_use, and other event types.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Fixes OhadAssulin#1

The Claude API now returns stream events wrapped in a structure with
type: 'stream_event' and an event property. This change extracts the
actual event from the wrapper before processing, ensuring proper
handling of content_block_delta, tool_use, and other event types.
Copy link
Owner

@OhadAssulin OhadAssulin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and fixes the stream_event regression. The normalization now unwraps stream_event.event, maps deltas/tool_use/message_stop correctly, and stops misclassifying every frame as init. Capturing session_id from the wrapped event is a nice touch.
I'll add a test.

@OhadAssulin OhadAssulin merged commit 086c6c6 into OhadAssulin:main Nov 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Claude adapter emits only init events when Claude SDK streams stream_event envelopes

2 participants