[BUG] Pasting Excel column data embeds clipboard image in session, causing persistent API 400 errors

Resolved 💬 3 comments Opened Feb 27, 2026 by seekerspm-admin Closed Mar 2, 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 copying a column from Excel and pasting into the Claude Code chat input, Excel places both text and image data on the clipboard. Claude Code captures the image data and embeds it as a base64 image in the session JSONL file.

Steps to reproduce:

Copy a column of cells from Microsoft Excel
Paste into the Claude Code VS Code extension chat input
Send the message
Expected: Only the text content is captured from the paste.

Actual: The clipboard image (Excel's visual representation of the column) is embedded as a base64 image in the session JSONL. This image exceeds the 8,000px dimension limit, causing API Error: 400 - image dimensions exceed max allowed size: 8000 pixels on every subsequent message in that session.

Workaround: Manually remove the base64 image entry from the session .jsonl file using PowerShell/text editor.

Environment: Windows 11, VS Code extension, Claude Code (claude-sonnet-4-6)

What Should Happen?

Two possible fixes for the Claude Code team:

Strip image data from clipboard pastes in the chat input (only accept text)
Validate image dimensions before embedding in the session file and reject oversized images with a user-facing warning

Error Messages/Logs

See above

Steps to Reproduce

see above

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

4.6

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

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