Skip to content

Fix parallel tool call results lost during session chain reconstruction#675

Open
mtessar wants to merge 1 commit intoanthropics:mainfrom
mtessar:claude/fix-parallel-serialization-1JxpJ
Open

Fix parallel tool call results lost during session chain reconstruction#675
mtessar wants to merge 1 commit intoanthropics:mainfrom
mtessar:claude/fix-parallel-serialization-1JxpJ

Conversation

@mtessar
Copy link

@mtessar mtessar commented Mar 12, 2026

I found a bug with serialization of parallel tool calls that shows up when you resume a session from disk. The description below is from Claude Code.

When parallel tool calls produce multiple user messages (tool results) sharing the same parentUuid, _build_conversation_chain only followed one linear path from leaf to root, dropping sibling tool results. Add a post-walk pass that finds and inserts missing user-type siblings in file order so all parallel tool results are preserved on session resume.

https://claude.ai/code/session_016uRTbX3TazbZbbG1RiDDb8

When parallel tool calls produce multiple user messages (tool results)
sharing the same parentUuid, _build_conversation_chain only followed one
linear path from leaf to root, dropping sibling tool results. Add a
post-walk pass that finds and inserts missing user-type siblings in file
order so all parallel tool results are preserved on session resume.

https://claude.ai/code/session_016uRTbX3TazbZbbG1RiDDb8
@mtessar
Copy link
Author

mtessar commented Mar 13, 2026

Hi! Happy to make any changes to this if needed. Just let me know. All tests passed so hopefully it's a good fix.

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.

2 participants