Teach Claude to handle user-pasted error messages efficiently

When the user pastes a specific error (stack trace, build failure,
"failed to execute X"), Claude now follows the error directly to the
relevant files instead of exploring the whole codebase.

https://claude.ai/code/session_01Fzv8baXnEVVhnrffAb3Ucc
This commit is contained in:
Claude
2026-03-29 23:36:46 +00:00
parent d30c26aa8e
commit 4005de673d
+19 -2
View File
@@ -4,9 +4,26 @@ This file is read automatically by Claude Code at the start of every session.
It teaches Claude to work efficiently on large codebases and avoid running out It teaches Claude to work efficiently on large codebases and avoid running out
of usage mid-task. of usage mid-task.
## Finding Errors in Large Codebases ## When the User Pastes an Error Message
When asked to find or fix errors, bugs, or issues across the codebase: The user often arrives with a specific error they hit — a build failure, a
runtime crash, a stack trace, a "failed to execute X" message. When this happens:
1. **Read the error carefully.** The file names, line numbers, and error type
are already in the message. Don't go searching the whole codebase.
2. **Go directly to the file(s) mentioned in the error.** Read only those files,
and only the relevant sections (the function or area around the line number).
3. **Trace the cause.** If the error references an import, a missing variable,
or a function call, grep for that specific symbol — don't read surrounding
files "for context."
4. **Fix it, verify, commit.** After fixing, run the project's build/test
command (see Project-Specific Commands below) to confirm the fix works.
The key rule: **the error message IS your roadmap. Follow it, don't explore.**
## Finding Errors Across the Codebase
When asked to find or fix errors broadly (not a specific error message):
1. **Run the scanner first.** Execute: `python scan.py` 1. **Run the scanner first.** Execute: `python scan.py`
This runs the project's linters, tests, and type checkers in seconds. This runs the project's linters, tests, and type checkers in seconds.