CC-301f · Module 2
Error Pattern Recognition
3 min read
Some bugs are not individual errors — they are patterns. A memory leak manifests as gradually increasing response times before an eventual crash. A race condition manifests as intermittent failures that defy reproduction. A connection pool exhaustion manifests as timeout errors that increase in frequency over hours. These patterns are invisible when you look at individual log entries. They become obvious when you look at trends.
Claude identifies patterns when you ask the right question. "Are there any errors that increase in frequency over time?" catches resource leaks. "Are there any errors that correlate with high request volume?" catches concurrency issues. "Are there any errors that only occur between 2-4 AM?" catches time-dependent bugs (cron jobs, timezone issues, certificate rotations). The question frames the analysis. Without framing, Claude reports what it sees. With framing, Claude hunts for the specific pattern you suspect.
# Extract error counts per minute for trend analysis
grep "ERROR" app.log | \
awk '{print substr($1,1,16)}' | \
sort | uniq -c | sort -rn > error-frequency.txt
# Feed to Claude: "Analyze this error frequency data.
# Are errors increasing over time? Any spikes?"