Skip to content

[BUG] Session freezes when reading persisted-output tool-results file after large Bash output #18095

Closed as not planned

Description

@nil0ka

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • 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?

Claude Code session freezes indefinitely when attempting to Read a tool-results file that was created from a large Bash command output (<persisted-output>).

When Bash output exceeds ~30KB, it gets saved to a tool-results file. When Claude then tries to Read that file, the session becomes completely unresponsive - stuck in "Perusing..." state. Escape key does not work, and Ctrl+C requires multiple presses to interrupt. Only recovery is force exit and claude --continue.

What Should Happen?

Claude should successfully read the tool-results file and continue processing normally.

Error Messages/Logs

No error message displayed. Session simply hangs with no output.

The last visible output before freeze:
● Read(~/.claude/projects/.../tool-results/toolu_xxx.txt)

Then nothing - no response, no error, just frozen.

Steps to Reproduce

  1. Run a Bash command that produces large output (>30KB):
    gh pr diff

  2. Observe the output is saved to a persisted-output file:

  3. Claude attempts to Read the persisted tool-results file to analyze the diff

  4. Session freezes - no response, stuck state

Note: The freeze occurs specifically when Claude's Read tool attempts to access the tool-results file created from large Bash output. Tested with gh pr diff producing ~34KB output.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.6

Claude Code Version

2.1.7

Platform

AWS Bedrock

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

Potentially Related Issues

v2.1.7 Changelog Reference

v2.1.7 changelog mentions: "Fix orphaned tool_result error when sibling tool fails during streaming" - this fix may have introduced the regression.

Workaround

Split large outputs before execution:
gh pr diff 2121 | head -200
# or
gh pr diff 2121 -- specific/file.rb

Environment

  • Running in GitHub Codespaces (Linux container)
  • Issue does not occur when Bash output is small enough to display inline

Activity

  1. github-actions commented on Feb 27, 2026

    @github-actions

    Closing for now — inactive for too long. Please open a new issue if this is still relevant.

  2. github-actions commented on Mar 9, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  3. locked as resolved and limited conversation to collaborators on Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleIssue is inactive

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions