Collapsed transcript labels a Bash file write (`cat >>`) as "Read 1 file"
Environment
- Claude Code 2.1.226, macOS (Darwin 25.6.0), terminal TUI
What happened
The model ran a Bash tool call that appends to a file via heredoc:
cat >> /path/to/notes.md <<'EOF'
...text...
EOF
echo appended
The collapsed transcript line summarized it as:
Read 1 file (ctrl+o to expand)
Expanding with ctrl+o shows the real command — an append (write), not a read.
Why it matters
The collapsed summary is what an operator skims to know whether an agent merely read their system or modified it. Read-vs-write is the one distinction that matters most for trust and auditing, and this label inverts it: a write to disk is presented as a read.
Repro
Any Bash tool call of the form cat >> file <<'EOF' ... EOF. The summarizer appears to classify cat as file-reading without checking for output redirection.
Expected
Label it as a write/update (or fall back to the generic Bash command label) whenever the command contains redirection (>, >>) or similar write forms (tee), regardless of the leading command word.
---
Observed live in a session where the agent appended investigation notes to a markdown file; the user spotted the mislabel while reviewing the transcript. Filed by Claude Code on the user's behalf.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗