Claude Code can process error logs, stack traces, and even screenshots of dashboards to help diagnose production issues.
Feed It Logs
# Pipe logs directly
kubectl logs my-pod --tail=100 | claude -p "What's causing the errors?"
# Or paste in-session
> Here are the last 50 lines of the API server logs:
> [paste logs]
> What's going wrong?
Feed It Screenshots
During an outage, screenshot your monitoring dashboard and paste it into Claude (Ctrl+V):
[paste screenshot of Grafana dashboard]
What does this dashboard tell us about the current issue?
What should I investigate first?
Anthropic’s data infrastructure team used this during a Kubernetes outage. Claude identified pod IP exhaustion from a dashboard screenshot and provided the exact kubectl commands to fix it.
Feed It Stack Traces
Stack traces that used to take 10-15 minutes to trace through resolve 3x faster:
> Here's the stack trace from the crash:
> [paste trace]
> Trace this through our codebase and identify the root cause.
Claude reads the relevant source files, follows the call chain, and pinpoints the issue.
Combine with CLI Tools
Run `kubectl describe pod my-pod` and `kubectl get events`
and tell me why this pod keeps crashing.
Claude runs the commands, reads the output, and provides a diagnosis, often identifying issues like resource limits, image pull failures, or misconfigured health checks.