[BUG] Weird bug in Claude Code WSL when reading a PDF file

Resolved 💬 3 comments Opened Aug 1, 2025 by sudarshansivakumar Closed Aug 15, 2025

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.65 (Claude Code)
  • Operating System: Windows 11
  • Terminal: Ubuntu WSL

Bug Description

I asked Claude code to read a file in .env.pdf - this was not actually a PDF file but an env file with some content in it for local testing.
The goal was that Claude code would read this and create a new example env for me. After this any subsequent interaction in the session lead to an error like this

<img width="1919" height="278" alt="Image" src="https://github.com/user-attachments/assets/ac8535b4-88a9-46d6-ab51-f18998075627" />

Steps to Reproduce

  1. Create a file in your folder called .env.pdf and add some text content in it (so it's not actually a PDF)
  2. Claude code reads it and starts throwing a 400 invalid request error for the rest of the session

Expected Behavior

I understand if it's not able to read the file but the 400 for the entire session is a little concerning. Ideally it should just move on from that 400 and respond to the subsequent queries

Actual Behavior

Already described

View original on GitHub ↗

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