[BUG] Read tool rejects .dat files

Resolved 💬 3 comments Opened May 8, 2026 by seedship Closed Jun 5, 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?

The Read tool incorrectly classifies .dat text files as binary, forcing use of sed for viewing and editing. Workaround is symlink to .txt or use sed -n.

What Should Happen?

The Read tool should just be able to directly read .dat ASCII files

Error Messages/Logs

Steps to Reproduce

  1. Create a file data.dat
Here is some data
  1. Ask claude "What is in data.dat"
  2. Tell claude can you insert the line: "Here is some more data"
  3. Claude will attempt to make the changes using sed, making it hard to see the changes it wants to make

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.98 (Claude Code)

Platform

AWS Bedrock

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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