dobbe

dobbe incident

Triage and resolve Sentry incidents with AI.

Subcommands

Subcommand Description
incident triage Triage unresolved Sentry incidents with AI analysis
incident resolve Auto-generate fixes for a specific Sentry incident

incident triage

Triage unresolved Sentry incidents with AI analysis.

Synopsis

dobbe incident triage [OPTIONS]

Description

incident triage fetches unresolved incidents from a Sentry organization (optionally scoped to a project) and uses Claude AI to analyze each one. The AI evaluates severity, identifies patterns across incidents, and provides prioritized recommendations for resolution.

Requires Sentry MCP. The Sentry MCP server must be configured in your Claude settings (~/.claude/settings.json). The command will exit with an error if the Sentry MCP is not available.

Flowchart

┌─────────────────────────────────────────────┐
│   dobbe incident triage --org my-org        │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Parse CLI args + merge config defaults     │
│  - org from --org or config                 │
│  - severity from --severity or config       │
│  - format from --format or config           │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Validate severity values                   │
│  (critical, high, medium, low only)         │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Validate --since value                     │
│  (24h, 7d, 30d only)                        │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Discover MCP servers + tools               │
│  (~/.claude/settings.json)                  │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Check Sentry MCP availability              │
│  Error if not configured                    │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Run triage pipeline                        │
│  - Fetch unresolved incidents from Sentry   │
│  - Filter by severity and time range        │
│  - AI analysis of each incident             │
│  - Timeout: 600s                            │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Save session (best-effort)                 │
│  - Stored for cross-command resume          │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Render output                              │
│  --format table (default) / json / markdown │
│  --output file (optional)                   │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Optional: Notify                           │
│  --notify slack -> post to --channel        │
│  --notify jira  -> create tickets           │
└─────────────────────────────────────────────┘

Options

Option Type Default Description
--org / -o str - Sentry organization slug
--project / -p str - Sentry project slug (optional scope)
--severity / -s str critical,high,medium,low Comma-separated severity filter
--since str - Time range: 24h, 7d, 30d
--format / -f str table Output format: table, json, markdown
--output str - Write output to file instead of stdout
--notify str - Send report to platform (slack, jira)
--channel str - Notification channel (e.g., #incidents)
--quiet / -q bool False Suppress progress output, only show final result

If --org is not specified, the default organization from config is used. If neither is available, the command exits with an error.

Examples

Triage all incidents for an organization

dobbe incident triage --org my-org

Scope to a specific project and time range

dobbe incident triage --org my-org --project backend-api --since 24h

Filter by severity

dobbe incident triage --org my-org --severity critical,high

JSON output to file

dobbe incident triage --org my-org --format json --output triage-report.json

Send report to Slack

dobbe incident triage --org my-org --notify slack --channel "#incidents"

Quiet mode for CI pipelines

dobbe incident triage --org my-org --format json --quiet --output triage.json

incident resolve

Resolve a specific Sentry incident by fixing its root cause.

Synopsis

dobbe incident resolve --repo <org/repo> --issue <issue-id> [OPTIONS]

Description

incident resolve takes a Sentry issue ID and its associated repository, then uses Claude AI to analyze the root cause, generate a fix, verify the fix with tests, and optionally create a pull request. The command runs an agentic loop that iterates up to --max-iterations times to produce a verified fix.

Flowchart

┌─────────────────────────────────────────────┐
│  dobbe incident resolve --repo org/repo     │
│                         --issue ISSUE-123   │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Parse CLI args + merge config defaults     │
│  - format from --format or config           │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Discover MCP servers + tools               │
│  (~/.claude/settings.json)                  │
│  Warn if Sentry MCP not available           │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Run resolve pipeline                       │
│  For up to --max-iterations:                │
│    - Analyze Sentry issue + stack trace     │
│    - Identify root cause in repo            │
│    - Generate fix                           │
│    - Run tests to verify                    │
│    - Retry if verification fails            │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Save session (best-effort)                 │
│  - Stored for cross-command resume          │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Optionally create PR                       │
│  --create-pr (default) / --no-pr            │
│  - Branch from --base or auto-detected      │
└──────────────────────┬──────────────────────┘
                       │
                       v
┌─────────────────────────────────────────────┐
│  Render output                              │
│  --format table (default) / json / markdown │
│  Shows: root cause, fix, files modified,    │
│         tests added, verification status    │
└─────────────────────────────────────────────┘

Options

Option Type Default Description
--repo / -r str required Repository to fix (org/repo)
--issue / -i str required Sentry issue ID to resolve
--max-iterations int 3 Max fix-verify iterations (1-10)
--create-pr / --no-pr bool True Create a pull request on success
--base str - Base branch (auto-detected if not specified)
--format / -f str table Output format: table, json, markdown
--quiet / -q bool False Suppress progress output

Both --repo and --issue are required.

Examples

Resolve a specific incident

dobbe incident resolve --repo my-org/backend-api --issue ISSUE-12345

Resolve without creating a PR

dobbe incident resolve --repo my-org/backend-api --issue ISSUE-12345 --no-pr

Increase iteration budget for complex issues

dobbe incident resolve --repo my-org/backend-api --issue ISSUE-12345 --max-iterations 5

Specify a base branch

dobbe incident resolve --repo my-org/backend-api --issue ISSUE-12345 --base develop

JSON output for downstream processing

dobbe incident resolve --repo my-org/backend-api --issue ISSUE-12345 --format json

See Also