Skip to content

fix: pair tool results with tool calls in session restore#36

Merged
dimakis merged 1 commit into
mainfrom
fix/restore-tool-results
Apr 3, 2026
Merged

fix: pair tool results with tool calls in session restore#36
dimakis merged 1 commit into
mainfrom
fix/restore-tool-results

Conversation

@dimakis
Copy link
Copy Markdown
Owner

@dimakis dimakis commented Apr 2, 2026

Summary

Test plan

  • 205 tests pass, tsc --noEmit clean, pre-commit hooks pass
  • Restore a session that had tool calls — tool pills should show with results
  • New streaming sessions still render tool calls correctly

Made with Cursor

Tool results arrive in user-type SDK messages, separate from the
assistant message containing the tool_use blocks. The first pass
now collects all tool results into a map keyed by toolId, then
the second pass pairs them when building v2 FinishedMessage blocks.
Previously tool pills rendered without results on session restore.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Made-with: Cursor
@dimakis dimakis merged commit 1716ed4 into main Apr 3, 2026
1 check passed
@dimakis dimakis deleted the fix/restore-tool-results branch April 3, 2026 00:01
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