[BUG] After a compact, if I ask Claude code to read a file pdf, md or csv, I receive an API 400.

Resolved 💬 5 comments Opened Oct 17, 2025 by starmath-ai Closed Jan 10, 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?

After a compact of the conversation, if I ask Claude code to reread a file pdf, md or csv (Claude doesn't always remember all of the information in files that he has read before the compact), I receive an API 400 error. After the error, there is no way to continue the conversation. Even the command rewind does not help. This has been happening for months. It has gotten to the point that instead of doing a compact, I simply create a new conversation.

What Should Happen?

After a compact, Claude code should be able to read any pdf, md or csv file whether previously read or not.

Error Messages/Logs

API 400

Steps to Reproduce

Have Claude code read a pdf, md or csv file before compact. After compact, ask him to read the file again.

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.0.21

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

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