SDKs JavaScript SDK Python SDK Go SDK Ruby SDK Docs Pricing Blog Error Guides Book a Demo
Log In Start Free Trial

bugstack Documentation

bugstack captures runtime errors from your production app, generates surgical code fixes with AI, and opens tested pull requests on GitHub. Pick your language, install the SDK, and ship.

Start here

Quickstart

From zero to first auto-fix PR in 5 minutes.

Install by language

Platform docs

SDK reference

What bugstack does

bugstack sits between your production error stream and your GitHub repository. When your application throws an error the SDK hasn't seen before, bugstack reads the stack trace, fetches the offending file from your repo, drafts a surgical code fix, runs it through your CI pipeline, and opens a pull request — all in under two minutes. You review and merge. Or, if you trust it, auto-merge on CI green.

This is different from error monitoring. Sentry, Datadog, and Rollbar tell you an error happened. bugstack makes it stop. Same capture pipeline, but the artifact at the end is a merged fix rather than a Slack notification.

How a fix happens

  1. Capture. The SDK intercepts the error on your server, attaches request and user context, and ships it to bugstack asynchronously. Your response latency is unaffected.
  2. Triage. bugstack fingerprints the error, deduplicates against past occurrences, and checks whether this type of bug has an existing fix pattern.
  3. Fetch context. The GitHub App reads only the files named in the stack trace, plus their immediate imports. Your full codebase never leaves your repo.
  4. Generate fix. A frontier model drafts a minimal patch — usually 1–10 lines — that addresses the root cause while preserving surrounding behavior.
  5. Validate in CI. bugstack opens a branch, pushes the patch, and runs your existing GitHub Actions. If CI fails, the model reads the failure and retries up to three times.
  6. Open the PR. You get a pull request with the diff, the stack trace that triggered it, the AI's reasoning, and CI status. Auto-merge is optional.

Common integration patterns

Most teams roll bugstack out in three phases. First, install the SDK in a staging environment to confirm capture and validate the fix quality on known bugs. Second, move to production with auto-merge disabled — every fix becomes a PR that a human reviews. Third, after two or three weeks of reviewing fixes, enable auto-merge for PRs where CI passes and the confidence score is above your chosen threshold.

You can also scope bugstack to specific error types (e.g. only N+1 queries and null-access errors) or specific paths (e.g. only /api/*) using dashboard filters. This is the typical configuration for teams whose codebase has legacy areas they don't want automated changes in.

Ready to ship?

Install the SDK, connect your repo, and let bugstack fix production errors while you sleep.