Skip to main content
Tembo monitors your error tracking tools and automatically generates pull requests to fix bugs as they happen in production.

How it works

1

Error detected

Sentry captures an error in your application and sends a webhook to Tembo.
2

Analysis

Tembo retrieves the full error context (stack traces, breadcrumbs, environment details) and analyzes your codebase to understand the root cause.
3

Fix generated

A coding agent writes the fix in an isolated sandbox, runs tests, and opens a PR with the change and full context.
4

Review and merge

You review the PR and use the feedback loop to iterate if needed. Merge when ready.

Set up automatic bug fixes

1. Connect Sentry

Navigate to the Integrations page and connect your Sentry account. Map your Sentry projects to the repositories where errors occur. See the full Sentry integration guide for details.

2. Create an automation

Go to Automations in your dashboard and create a new automation with a Sentry event trigger. Trigger: sentry.issue.created or sentry.issue.regression MCP Servers: GitHub + Sentry Example instructions:
When a new Sentry error is detected:
1. Retrieve the full stack trace and error context
2. Identify the root cause in the codebase
3. Write a fix and add tests
4. Open a PR with a clear description of what went wrong and how it's fixed
Use the Auto Fix Sentry Errors template to automatically diagnose new errors, identify the root cause, and open a fix PR.

3. Fine-tune with rule files

Add rule files to your repo so the agent follows your coding standards, test patterns, and PR conventions when generating fixes.

Best practices

  • Map projects accurately: Connect Sentry projects to the correct repos, especially for monorepos.
  • Enable rich context: Turn on source maps, breadcrumbs, and custom tags in Sentry so the agent has more to work with.
  • Review before merging: Always review the PR. Use the feedback loop to refine the fix.
  • Test in staging first: Validate fixes in a staging environment before merging to production.