[BUG] "PDF too large" error persists on unrelated messages after referencing a file path

Resolved 💬 3 comments Opened Jan 6, 2026 by FAmodeo Closed Jan 9, 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?

Description

After mentioning a file path in a message (e.g., /Users/.../file.pdf), subsequent unrelated messages trigger the same "PDF too large" error — even messages with no file reference like "what's your favourite color?".

## Environment

  • macOS Darwin 25.1.0
  • Claude Code CLI
  • PDF in question: 1.9MB (not actually large)

## Workaround
Wrap file paths in backticks or start a new conversation (losing context).

## Notes
Clearing ~/.claude/session-env/ and ~/.claude/shell-snapshots/ did not resolve the issue. Appears to be client-side input preprocessing that incorrectly caches file path detection state.

What Should Happen?

## Expected Behavior
File path detection should only apply to the message containing the path, not persist across subsequent messages.

Error Messages/Logs

Steps to Reproduce

## Steps to Reproduce

  1. Reference a PDF file path in a message (e.g., access this paper: /path/to/file.pdf)
  2. Receive "PDF too large. Please double press esc to edit your message and try again."
  3. Send a completely unrelated message (e.g., "hello")
  4. Same PDF error appears

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Claude Code CLI

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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