[MODEL] Parallel file reads lose filename-to-content association, causing silent data swap
Preflight Checklist
- [x] I have searched existing issues for similar behavior reports
- [x] This report does NOT contain sensitive information (API keys, passwords, etc.)
Type of Behavior Issue
Claude made incorrect assumptions about my project
What You Asked Claude to Do
I asked Claude Code to rename 30 scanned PDF gas receipts based on their content. Each PDF contains a gas station receipt with date, litres, and dollar amount. Claude should read each PDF, extract the data, and rename the file to the format <date>_<litres>_$<amount>.pdf.
What Claude Actually Did
- Claude read all 30 PDFs in batches of 10 using parallel Read tool calls.
- 2. Claude correctly extracted the date, litres, and amount from every receipt.
- 3. For most files, Claude successfully matched content back to filenames because the date prefix in the existing filename matched the receipt date.
- 4. However, 4 files shared the same date prefix (2026-04-19_*) because they were scanned on the same day but contained receipts from different dates. Two of these were both Costco gas receipts.
- 5. Claude had to guess which rendered PDF document came from which file — and guessed wrong for the two Costco receipts.
- 6. Result: the two files were renamed with each other's data — a perfect silent swap of date, litres, and amount between the two files.
- 7. No warning or uncertainty was flagged for these specific files. The error was only caught when the user manually verified.
Expected Behavior
When multiple files are read in parallel via the Read tool, the returned document content should maintain a clear, programmatic association with the source filename. The model should not have to guess which rendered content belongs to which file.
Alternatively, for content-dependent operations (like rename-by-content), Claude should process files sequentially — read one file, act on it, then read the next — rather than reading in parallel batches where the content-to-filename link is lost.
Files Affected
Permission Mode
Accept Edits was ON (auto-accepting changes)
Can You Reproduce This?
Haven't tried to reproduce
Steps to Reproduce
_No response_
Claude Model
Opus
Relevant Conversation
Impact
Medium - Extra work to undo changes
Claude Code Version
2.1.116 (Claude Code)
Platform
Anthropic API
Additional Context
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗