Sentry Auto-Fix
Polls Sentry for production errors, generates fixes with frontier models, and opens PRs automatically

In production: Monitors ClawsMarket's own production errors. Runs every 6 hours, has auto-fixed real bugs in this codebase.
An automated production bug fixer that integrates with Sentry to detect errors, uses Claude Opus to analyze stack traces and generate minimal code fixes, and creates GitHub pull requests with the patches.
The pipeline runs on a schedule (every 6 hours by default), polling your Sentry project for unresolved issues. For each new error, it fetches the full stack trace and breadcrumbs, reads the relevant source files from your local checkout, and sends everything to Claude for analysis.
Claude produces targeted, minimal fixes — no refactoring, no style changes, just the bug fix. Each fix includes a confidence rating (high/medium/low) and an explanation. The pipeline then creates a branch, applies the fix, pushes, and opens a PR with the Sentry link and diff.
Includes a local dashboard for tracking issues, fixes, PRs, and pipeline runs.
Your agent controls the pipeline via API — adjust confidence thresholds, ignore specific error levels, swap models, and set schedules.
What's included
Agent Config API
Everything is editable via API — prompts, templates, scoring rubrics, model choices, schedules. Your agent reads the config, changes what it needs, and triggers runs. No source code needed.
Prompts & Logic— Edit the AI's instructions, scoring criteria, and decision-making rules
fix_promptmultilineSystem prompt for the bug fixer model. Controls how it analyzes errors, formats fixes, and decides when to skip.
triage_promptmultilineInstructions for triaging errors before analysis. Controls which errors to prioritize or ignore.
Thresholds & Tuning— Adjust sensitivity, limits, and quality gates
max_issues_per_runnumberMaximum number of new issues to analyze per pipeline run. Default: 10.
min_confidencechoicelow | medium | highMinimum confidence level to create a PR. Lower confidence fixes are stored but not pushed.
lookback_hoursnumberHow far back to look for unresolved issues. Default: 168 (7 days).
ignore_levelsJSONError levels to skip. Default: ["debug", "info"].
Models— Choose which AI models power each stage
fix_modelchoiceclaude-opus | claude-sonnet | gpt-4oFrontier model for generating code fixes.
Scheduling— Control when the pipeline runs
schedule_croncronWhen the pipeline runs. Default: every 6 hours.
Integrations— Connect your tools and services
sentry_projecttextSentry project slug to monitor.
sentry_orgtextSentry organization slug.
github_repotextGitHub repo in owner/name format (e.g. myorg/myapp).
github_base_branchtextBranch to create fix PRs against. Default: main.
webhook_urltextURL for real-time notifications (new issues, PRs created).
# Read full config (all prompts, templates, thresholds, etc.)
curl https://www.clawsmarket.com/api/workflows/sentry-auto-fix/config \
-H "Authorization: Bearer claws_YOUR_KEY"
# Edit a prompt — your agent rewrites the AI's instructions
curl -X PATCH https://www.clawsmarket.com/api/workflows/sentry-auto-fix/config \
-H "Authorization: Bearer claws_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"personalization_prompt": "Write casual, founder-to-founder icebreakers...",
"scoring_threshold": 15,
"schedule_cron": "0 2 * * *"
}'
# Replace email templates with your own
curl -X PATCH https://www.clawsmarket.com/api/workflows/sentry-auto-fix/config \
-H "Authorization: Bearer claws_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "email_templates": { "step_1": [...], "step_2": [...] } }'
# Reset everything to battle-tested defaults
curl -X POST https://www.clawsmarket.com/api/workflows/sentry-auto-fix/reset \
-H "Authorization: Bearer claws_YOUR_KEY"
# Trigger a run now
curl -X POST https://www.clawsmarket.com/api/workflows/sentry-auto-fix/trigger \
-H "Authorization: Bearer claws_YOUR_KEY"
# Get latest outputs
curl https://www.clawsmarket.com/api/workflows/sentry-auto-fix/outputs \
-H "Authorization: Bearer claws_YOUR_KEY"Tools used
Skills used
Tech stack
Community
- Full API access — no feature gates
- Dashboard + agent config API
- All integrations included
- Cancel anytime