[BUG] Parallel tool results corrupted after session resume - only last result retained

Resolved 💬 4 comments Opened Mar 6, 2026 by quei4r Closed Apr 1, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When executing multiple parallel Bash tool calls and then resuming the session with claude --resume, only the last tool result is retained. Other parallel tool results are lost from the session history loaded by CLI.

Example from my test:

  • Execute 3 parallel Bash commands: sleep 3 && echo $RANDOM, sleep 4 && echo $RANDOM, sleep 5 && echo $RANDOM
  • Actual results during execution: 1929, 30590, 2554
  • After claude --resume and asking for results, AI only correctly reports the last number (2554)
  • The first two numbers are lost, causing AI to hallucinate incorrect values (28487, 14021) to fill the gap

What Should Happen?

After claude --resume, Claude should correctly recall all parallel tool execution results from the session history, not just the last one.

Error Messages/Logs

No error messages shown. The session resumes without errors, but parallel tool results are missing from the loaded history (only the last result is retained).

Steps to Reproduce

  1. Start a new Claude Code session
  1. Run this exact test prompt:
Please execute a test:

Run three Bash commands in parallel, each sleeping for 3-5 seconds then outputting $RANDOM

⚠️ Constraints during execution:

Do NOT actively record, mention, or reference these random numbers in your thinking process or first response
First response should ONLY say "Done"
Handling subsequent questions:

If the user later asks "what were the results", read them from the tool return history in previous messages and answer normally
Purpose: Verify whether you can correctly read tool results from history when you have no "memory" of them.
  1. Note the three random numbers returned by the Bash commands (e.g., 1929, 30590, 2554)
  1. Exit Claude Code completely
  1. Resume the session: claude --resume <session-id>
  1. Ask exactly: What were the results of the three tests just done?
  1. Observe that only the last random number is correctly reported; the first two are lost (AI may hallucinate incorrect values)

Claude Model

Other

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.70

Platform

Other

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

Screenshots attached (4 images):

Case 1 - After initial execution (data already lost):

  • case1-part1.png: Test prompt and parallel Bash execution

<img width="1388" height="896" alt="Image" src="https://github.com/user-attachments/assets/2acd6b33-5265-42a2-9cb2-12bf4bc6118e" />

  • case1-part2.png: AI only finds ONE tool result (23095) in message history, missing the other two. AI honestly reports this discrepancy.

<img width="1779" height="1390" alt="Image" src="https://github.com/user-attachments/assets/e5deb9d6-397e-4220-8860-22c256a13afd" />

Case 2 - After claude --resume (resume makes it worse):

  • case2-part1.png: Same session resumed

<img width="1452" height="882" alt="Image" src="https://github.com/user-attachments/assets/c99c4ac2-1550-4025-87ed-79319012d842" />

  • case2-part2.png: AI reports THREE results but only the last one (2554) is correct. The first two (28487, 14021) are hallucinated to fill the gaps.

<img width="1446" height="1124" alt="Image" src="https://github.com/user-attachments/assets/b8e035d1-3376-4692-85b1-d74ea1b43c5a" />

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗