Skip to content

fix(types): sync ParsedContentBlock with ContentBlock#1580

Open
xodn348 wants to merge 1 commit into
anthropics:mainfrom
xodn348:fix/parsed-content-block-sync
Open

fix(types): sync ParsedContentBlock with ContentBlock#1580
xodn348 wants to merge 1 commit into
anthropics:mainfrom
xodn348:fix/parsed-content-block-sync

Conversation

@xodn348
Copy link
Copy Markdown
Contributor

@xodn348 xodn348 commented May 21, 2026

Fixes #1422

What

ParsedContentBlock (used by ParsedMessage.content in the streaming accumulator) was missing 6 content block types that ContentBlock includes. This caused stream.get_final_message() to silently drop these block types from the accumulated message.

Issue #1422 reported this for the beta types (ParsedBetaContentBlock). The same gap existed in the non-beta ParsedContentBlock.

Added:

  • WebFetchToolResultBlock
  • CodeExecutionToolResultBlock
  • BashCodeExecutionToolResultBlock
  • TextEditorCodeExecutionToolResultBlock
  • ToolSearchToolResultBlock
  • ContainerUploadBlock

Verification

  • Build: pass
  • Tests: pass (253 passed)
  • Lint: pass (ruff)
  • Type check: pass (pyright, 0 errors)

…cs#1422)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@xodn348 xodn348 requested a review from a team as a code owner May 21, 2026 05:16
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.

ParsedBetaContentBlock union missing tool_search/web_fetch result blocks — stream accumulator drops them from get_final_message()

1 participant