Claude Code has several ways to read a file. Understanding which one it picks, and knowing how to nudge it toward the right one, changes the quality of its answers.
The Read tool vs Bash cat
When you ask "read this file", Claude Code uses its Read tool by default, not cat. Why?
- Read shows line numbers: it can cite a specific line and edit it afterward.
- Read handles large files: it can read in chunks via
offsetandlimit. - Read works on images: if you point it to a screenshot, it can see it.
- Read works on PDFs and notebooks: by page range or by cell.
Then ask it:
Reading only a portion
On a large file, explicitly ask for a range.
Why this matters
When Claude reads with Read, it keeps line numbers in memory. So if you then ask "rename foo to bar on line 42", it knows exactly where to act.
See also · claude-codeclaude-code / premier-promptReview how to write a prompt that guides Claude well
Sources
Related
See also · terminalWhat is a terminal
