Skip to content

fix: propagate message_delta.container into aggregated Message for code_execution continuation#1441

Closed
Zelys-DFKH wants to merge 1 commit intoanthropics:mainfrom
Zelys-DFKH:fix/propagate-message-delta-container
Closed

fix: propagate message_delta.container into aggregated Message for code_execution continuation#1441
Zelys-DFKH wants to merge 1 commit intoanthropics:mainfrom
Zelys-DFKH:fix/propagate-message-delta-container

Conversation

@Zelys-DFKH
Copy link
Copy Markdown

@Zelys-DFKH Zelys-DFKH commented Apr 24, 2026

Issue

Streaming-mode messages don't propagate the container field from message_delta events into the accumulated Message. This breaks multi-turn code_execution tool use, which requires the container_id on subsequent invocations.

Solution

Propagate container from delta into current_snapshot when processing message_delta SSE events, matching the behavior of non-streaming messages.create().

Testing

Verified existing streaming tests continue to pass (CI will validate).

…de_execution continuation

This ensures streaming mode behaves consistently with non-streaming messages.create()
when the model uses code_execution tools that require container_id on subsequent turns.
@Zelys-DFKH Zelys-DFKH requested a review from a team as a code owner April 24, 2026 17:17
@Zelys-DFKH
Copy link
Copy Markdown
Author

Closing in favor of #1426, which addresses the same issue with comprehensive testing. Discovered duplicate after implementation — should have checked first per our workflow.

@Zelys-DFKH Zelys-DFKH closed this Apr 24, 2026
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.

1 participant