ERR-006 recommended AI-Driven Error Handling

AI periodically reviews Sentry errors

Scheduled AI/Claude review of errors with actionable output (Slack, issues, or PRs)

Question to ask

"When did a human last actually review your error inbox?"

Verification guide

Severity: Recommended

Errors should be reviewed regularly, not just when someone remembers to check. AI can automate this review and surface actionable insights.

Check automatically:

  1. Check for Sentry API integration:
# Sentry API usage
grep -riE "sentry.*api|SENTRY_API|sentry\.io/api|getsentry" --include="*.ts" --include="*.js" --include="*.py" scripts/ jobs/ cron/ .github/workflows/*.yml 2>/dev/null | head -10
  1. Check for scheduled error review jobs:
# Scheduled jobs interacting with Sentry
grep -riE "sentry.*cron|sentry.*schedule|error.*review|error.*triage" .github/workflows/*.yml package.json crontab 2>/dev/null
  1. Check for Claude/AI error review:
# AI integration with error tracking
grep -riE "claude.*sentry|sentry.*claude|ai.*error|error.*ai|llm.*error" --include="*.ts" --include="*.js" --include="*.py" --include="*.md" . 2>/dev/null | grep -v node_modules | head -10

# Check CLAUDE.md for error review instructions
grep -iE "sentry|error.*review|error.*triage" CLAUDE.md 2>/dev/null

If not found in code, ask user:

  • "Do you have any automated process for reviewing Sentry errors?"
  • "Does an AI/Claude agent periodically look at new errors?"
  • "How do errors get triaged today - manually or automated?"

Cross-reference with:

  • ERR-007 (AI review feeds into auto-PR creation)
  • ERR-008 (triage determines which errors warrant attention)

Pass criteria:

  • Scheduled job or workflow that fetches errors from Sentry API
  • AI/Claude reviews errors on a cadence (daily, weekly)
  • Output is actionable (Slack notification, issue creation, or PR)

Fail criteria:

  • Errors only reviewed when someone manually checks Sentry
  • No automation around error review
  • Sentry alerts exist but no triage process

Partial (acceptable):

  • Manual AI review on-demand (not scheduled but process exists)
  • Sentry alerts to Slack, human triages, then asks Claude for help

Evidence to capture:

  • Review cadence (daily, weekly, manual)
  • Integration method (API, webhook, manual)
  • Output format (Slack, issues, PRs)

Section

19. Error Reporting

Error Tracking & Reliability