Bugbot
AI-powered detection of potential problems and autofix from comments. Learn how to use and configure Bugbot.
Bugbot
Bugbot uses OpenCode to analyze your branch against the base and report potential problems (bugs, risks, code quality issues) as comments on the issue and as review comments on open pull requests. You can then ask the bot to fix specific findings or to apply general code changes; it will apply edits, run your verify commands, and commit and push for you.
Detection
When and how Bugbot runs, where findings appear, severity, and overflow.
Autofix
Ask the bot to fix one or more findings from an issue or PR comment.
Do user request
Ask for general code changes (tests, refactors, features) from a comment.
Configuration
All Bugbot-related inputs: severity, comment limit, verify commands, ignore files.
How it works
Internal flow: detection, intent, Plan vs Build agents, commit and push.
Examples
Workflow snippets, comment examples, and CLI usage.
Quick summary
| What you do | What happens |
|---|---|
| Push to a branch linked to an issue | Bugbot analyzes the diff and posts findings on the issue and on any open PR; updates or marks findings as resolved when the code changes. |
| Comment “fix it” / “fix all” (with permission) | OpenCode fixes the chosen findings; the action runs verify commands and commits and pushes. |
| Comment “add a test for X” (with permission) | OpenCode applies the change; the action runs verify commands and commits and pushes. |
Requirements: OpenCode must be configured (opencode-server-url, opencode-model). For autofix and do-user-request, the workflow must grant contents: write and only organization members or the repository owner can trigger file-modifying actions. See Autofix and Configuration.