CC-301f · Module 1

Error Triage Framework

4 min read

The difference between a developer who debugs effectively and one who flails is a triage framework. Most developers see an error and immediately start guessing — changing code, restarting servers, clearing caches. Claude Code enables a disciplined alternative: present the error, let Claude classify it, and follow a structured diagnosis path.

The triage framework has three tiers. Tier 1: compile-time errors — TypeScript type errors, syntax errors, import resolution failures. These have exact file and line numbers. Claude resolves them with near-perfect accuracy because the error message contains all the information needed. Tier 2: runtime errors — null reference exceptions, unhandled promise rejections, assertion failures. These have stack traces that need interpretation. Claude excels at reading stack traces and identifying the root frame. Tier 3: behavioral errors — the code runs without crashing but produces wrong output. These are the hardest because there is no error message to analyze. Claude needs your description of expected vs. actual behavior.

  1. Tier 1: Compile-Time Errors Paste the error output directly. Claude reads the file, line, and error code. Resolution is usually immediate — wrong type, missing import, incompatible signature. Accuracy: >95%.
  2. Tier 2: Runtime Errors Paste the stack trace. Tell Claude which line is your code vs. framework code. Claude traces the call chain to the root cause. Often requires reading 2-3 files to understand the data flow that led to the error.
  3. Tier 3: Behavioral Errors Describe expected vs. actual behavior. Provide the input that produces wrong output. Claude needs a reproduction path — without it, diagnosis is speculation. This tier requires the most human guidance.