[BUG] Read tool fails on Opus 4.7 / 4.8 but works on Haiku 4.5 in the same session

Open 💬 4 comments Opened Jun 25, 2026 by AsteriskZuo

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)
  • [ ] I am using the latest version of Claude Code

What's Wrong?

Description

Summary: This appears to be a model-specific tool-call issue. Haiku 4.5 calls the Read tool correctly, while Opus 4.7 / 4.8 may generate an invalid pages: "" parameter for a Markdown file, causing the read operation to fail.

I encountered a reproducible issue where Claude Code can read a local file successfully when using Haiku 4.5, but fails when switching to Opus 4.7 or Opus 4.8.

The issue happens in the same client, same project, same session context, and with the same file path. Haiku 4.5 reads the file correctly, but Opus 4.7 / 4.8 fails when attempting the same file read.

I also tried reinstalling the Claude Code client and deleting all global .claude configuration directories, but the issue still persists.

## Environment

  • Client: Claude Code CLI
  • Same local machine
  • Same project
  • Same session context
  • Same file path
  • Models tested:
  • Haiku 4.5: works
  • Opus 4.7: fails
  • Opus 4.8: fails

## Reproduction Steps

  1. Open Claude Code in a local project.
  2. Use Haiku 4.5.
  3. Ask Claude to read a local file, for example:

```text
Please read docs/superpowers/specs/2026-06-24-log-get-info-design.md.
Only try once. If it fails, do not retry.
Reading one byte or one line is enough, just to test whether the file can be read.

  1. The file is read successfully.
  2. Switch the model to Opus 4.7 or Opus 4.8 in the same session.
  3. Ask the same request again.
  4. The file read fails.

Expected Behavior

Opus 4.7 / 4.8 should be able to read the same local file in the same way as Haiku 4.5, especially when the client, project, session context, and file path are unchanged.

Actual Behavior

Haiku 4.5 reads the file successfully, but Opus 4.7 / 4.8 fails when trying to read the same file.

In one observed failure, the Read tool call appeared to include an invalid empty pages parameter even though the target file was a Markdown file, not a PDF:

{
"file_path": ".../docs/superpowers/specs/2026-06-24-log-get-info-design.md",
"limit": 1,
"offset": 0,
"pages": ""
}

The tool then failed with an error similar to:

Invalid pages parameter: "". Use formats like "1-5", "3", or "10-20". Pages are 1-indexed.

Troubleshooting Already Tried

I have already tried the following:

  • Reinstalled the Claude Code client
  • Deleted all global .claude configuration directories
  • Retested in the same project and session context
  • Retested the same file path with different models

The issue still occurs with Opus 4.7 / 4.8, while Haiku 4.5 works normally.

Additional Notes

This looks model-dependent rather than environment-dependent, because the same client, same context, same file, and same local setup work correctly with Haiku 4.5.

What Should Happen?

Opus 4.7 / 4.8 should be able to read the same local file in the same way as Haiku 4.5, especially when the client, project, session context, and file path are unchanged.

Error Messages/Logs

Steps to Reproduce

  1. Open Claude Code in a local project.
  2. Use Haiku 4.5.
  3. Ask Claude to read a local file, for example:

```text
Please read docs/superpowers/specs/2026-06-24-log-get-info-design.md.
Only try once. If it fails, do not retry.
Reading one byte or one line is enough, just to test whether the file can be read.

  1. The file is read successfully.
  2. Switch the model to Opus 4.7 or Opus 4.8 in the same session.
  3. Ask the same request again.
  4. The file read fails.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.179

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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