Cursor says the average Bugbot review costs between $1.00 and $1.50, depending on pull request size and complexity, and that figure now drives the bill for every team on usage-based billing. Cursor also says 70% or more of Bugbot’s flags get resolved before merge. Those are two vendor-wide averages. Neither tells you what happens in your repository.
Setup is a solved problem, and our Cursor Bugbot setup walkthrough covers the dashboard clicks. Measurement is the gap. A Python scorecard of about 400 lines closes it with GitHub data alone: it pulls merged pull requests through the GraphQL API, finds the review threads Bugbot started, counts how many ended in a fix, estimates what the runs cost, and puts a confidence interval around the result. The whole build takes about 70 minutes across 12 steps.
By the end you will have a repeatable Cursor Bugbot scorecard, a before-and-after test for rule changes, and a weekly GitHub Actions job that fails only when the numbers are bad enough to matter.
Don't miss new tech stories on Google
Add Shattered once in the Google app and our stories show up in your news suggestions.
Why Bugbot’s 70% Claim Needs Your Own Scorecard #
A vendor average hides the variance that decides whether a tool earns its seat. Cursor’s own Bugbot page states that the product “optimizes for bugs that get fixed.” That is a design goal, and your repository decides how well the goal holds. Code written mostly by AI agents, a monorepo with generated files, and a team that merges 40-line pull requests all produce different hit rates from a team that ships 900-line refactors.
Cursor shipped its biggest Bugbot update on June 10, 2026. The company said Bugbot became more than 3x faster, 22% cheaper, and found 10% more bugs per review, with Composer 2.5 powering the reviews. Those gains are real improvements in the product. They still arrive as averages. If your team merges small, well-tested changes, the extra 10% of bugs may not exist in your diffs at all.
Billing makes the question sharper. Cursor announced on May 11, 2026 that Bugbot would move from a $40 per seat per month subscription to usage-based billing for Teams and Individual plans. New customers got usage-based billing immediately. Existing customers switch at the first renewal after June 8, 2026. The old $40 seat price is history now, and every review you trigger has a price.
That changes how you should read your own workflow. Under the default everyPush frequency, a pull request with six pushes can produce six billable runs. A learning pass after each merged pull request also draws on Bugbot usage. A team that measures only findings and ignores runs cannot tell whether the tool is cheap or expensive.
David Cramer, co-founder and chief product officer at Sentry, said in a testimonial on Cursor’s Bugbot page: “The hit rate from Bugbot is insane. Catching bugs early saves huge downstream cost.” Take the claim seriously and then check it. A scorecard answers three questions that no testimonial can:
- Precision: what share of Bugbot’s flags lead to a code change?
- Spend: what did the runs cost, and what does each acted-on flag cost?
- Trend: did the last rule change help, or did the numbers wobble by chance?
Teams comparing reviewers face the same measurement problem, and our AI code review tool comparison shows how much published accuracy figures disagree. A local scorecard sidesteps that argument. It scores the tool on your pull requests, your languages, and your merge habits.
Prerequisites and Versions You Need First #
Gather these before the first step. The Python side needs nothing beyond the standard library, so there is no dependency tree to audit.
| Requirement | Version or detail | Why it matters |
|---|---|---|
| Cursor plan with Bugbot | Premium ($30/month), Super ($100), Ultra ($200), Teams, or Enterprise | Cursor’s pricing table marks Bugbot unavailable on Free and Plus |
| On-demand usage | Enabled in the Cursor dashboard | Team reviews bill from on-demand usage, and individual accounts when included usage runs out |
| Repository access | Admin rights on one GitHub repository with Bugbot connected | Connecting turns Bugbot on for the repositories you grant |
| Python | 3.12 or newer | The code uses built-in generic type hints such as list[dict] |
| pytest | Latest version | Runs the offline tests against fixture data |
| GitHub access | A fine-grained token with read access to Pull requests, Checks, and Metadata, or gh auth token |
The GraphQL queries read review threads and check runs |
| Cursor desktop | 3.7 or newer (optional) | Needed only for the /review-bugbot skill used in the advanced section |
| Time | About 70 minutes | Assumes a month of merged pull requests already exists |
Two notes on scope. First, the scorecard targets GitHub. Bugbot also reviews GitLab, Bitbucket, Azure DevOps, and Origin repositories, but the check names and APIs differ, so the fetch step would need a rewrite for those hosts. Second, plan the sample before you code. A scorecard over eight pull requests tells you nothing, so aim for at least 30 merged pull requests with Bugbot active, which at typical team velocity means a month of history.
Plan pricing also shifts quickly. Cursor’s individual tiers read $8 (Plus), $30 (Premium), $100 (Super), and $200 (Ultra) per month on its current pricing page, and Teams runs $30, $100, or $200 per seat. Our Cursor, Claude Code, and Copilot pricing comparison tracks how those entry points compare if your team is still choosing a reviewer.
How the Scorecard Defines a Hit #
Every metric needs a definition you can defend in a code review. The scorecard uses GitHub review threads because Bugbot leaves inline comments, and each inline comment starts a thread with a resolution state.
| Metric | Definition | Known weakness |
|---|---|---|
| Flag | A review thread whose first comment came from the Bugbot login | Counts duplicates the same way as unique bugs |
| Resolved | The thread carries GitHub’s resolved state | Developers also resolve threads to dismiss false positives |
| Outdated | The commented lines changed after the comment, and the thread is still unresolved | Unrelated edits to the same lines look like fixes |
| Acted on | Resolved or outdated | An upper bound on true precision |
| Open | Neither resolved nor outdated at merge time | Mixes ignored flags with flags awaiting a decision |
| Thumbs-down | A thumbs-down reaction on the first comment | Sparse, because few developers click it |
| Run | A completed check run named “Cursor Bugbot” | Includes runs that cancelled on a newer commit |
| Estimated spend | Runs multiplied by $1.00 to $1.50 | Cursor’s average, not your invoice |
Read “acted on” as a ceiling. A developer who resolves a thread with the note “not a bug” counts as a hit in that column. The thumbs-down count partly offsets this, and the advanced section shows how to cross-check against Cursor’s own analytics. Still, the proxy is stable over time, and a stable proxy is what makes before-and-after comparisons honest.
The second design choice is statistical. A rate of 5 flags out of 6 sounds excellent, but the 95% Wilson interval for that sample runs from roughly 44% to 97%. The report prints the interval beside every rate so nobody celebrates noise. The same habit of measuring rates with a harness and error bars applies to model output generally, as our hallucination rate measurement harness shows for a different problem.
Step 1: Confirm Your Plan and Turn On Bugbot #
Open the Cursor dashboard, go to the Integrations tab, and connect your repository provider. On GitHub, connecting turns Bugbot on for every repository you grant access to. Then open Bugbot in Automations to see which repositories are active. Repositories stay off when someone who is not a team admin connects an enterprise team.
Check the plan before anything else, because the failure is silent. An individual account on Plus will not get reviews at all.
| Plan | Price | Bugbot status |
|---|---|---|
| Free | $0 | Not available |
| Plus | $8/month | Not available |
| Premium | $30/month | Available, 4x Plus plan usage |
| Super | $100/month | Available, 15x Plus plan usage |
| Ultra | $200/month | Available, 50x Plus plan usage |
| Teams | $30, $100, or $200 per seat/month | Reviews bill from on-demand usage |
| Enterprise | Custom | Available, adds the Bugbot API |
Source: Cursor’s pricing and Bugbot documentation, checked November 29, 2026. For a second read on the cost side, the Activepieces pricing guide for teams on a budget covers usage-based review spend.
On Individual plans, Bugbot bills from included usage first and then from on-demand usage if you turned it on. With on-demand disabled, Bugbot s until the next billing cycle. On Teams, reviews charge against on-demand usage, so enable it before you expect a single comment.
Verify the connection with a throwaway pull request. Push a branch that changes two lines in any source file, open the pull request, and wait. Bugbot posts a status check named “Cursor Bugbot” on GitHub. If the check never appears within a few minutes, jump to the troubleshooting section before writing any code.
Steps 2 and 3: Commit a Baseline Config and Prove the Rules Load #
A scorecard measures change, so it needs a fixed starting point. Commit two small files to your default branch before the first measured pull request. The first is the optional repository config.
version: 1
triggers:
drafts: false
frequency: everyPush
review:
effort: default
incremental: true
prSummary:
mode: comment
riskScore: true
autofix:
mode: disabled
Bugbot reads .cursor/config/bugbot.yaml from the base branch of each pull request, the branch the change merges into. The file must be committed and pushed. Because Bugbot ignores the head version, a pull request cannot loosen the rules that review it, so use CODEOWNERS to control who edits the file. Every field is optional. An invalid field is ignored and Bugbot falls back to the next setting in its precedence order: the pull request author’s personal overrides first, then the YAML file, then the team settings from the dashboard. Files larger than 64 KB are skipped entirely.
Pin effort: default on purpose. Cursor documents four effort levels on usage-based plans: Low, Default, High, and Smart. Low trades speed for cost, High spends more time reasoning and may find more bugs, and Smart lets you describe in plain language when each level applies. Changing effort mid-measurement muddies the baseline, so treat it as an experiment variable for Step 11 and not a casual toggle.
The second file holds your review rules.
- Flag any new use of `eval(` or `exec(` in changed Python files as a blocking bug.
- Flag a changed file under `api/` or `server/` when the PR adds no test file.
- Skip style nits. Formatting is enforced by the linter in CI.
- When a function swallows an exception with a bare `except:`, explain the failure it hides.
Bugbot always includes the root .cursor/BUGBOT.md and also walks upward from each changed file to collect nested BUGBOT.md files, so a backend/.cursor/BUGBOT.md only applies to backend changes. One trap catches most Cursor users. Your *.mdc project rules in .cursor/rules/ do not apply to Bugbot runs. Rules written there shape the agent in your editor and do nothing for pull request review.
Each rule truncates at 30,000 characters, and the combined rules for a review cap at 100,000 characters, according to Cursor’s Bugbot documentation. When team rules, project files, learned rules, and manual rules all apply, Bugbot merges them in that order. Required team rules win if the cap forces omissions.
Prove the rules load before you trust any numbers. Open a pull request and comment:
bugbot run verbose=true
Bugbot replies with a table of every rule included in that run and flags any that were truncated or omitted, plus a request ID. Keep that ID and include it whenever you contact Cursor support. The comment cursor review verbose=true does the same job, and both manual triggers are ignored when a bot account or GitHub App posts them.
Steps 4 and 5: Create the Project and Find the Bot’s Login #
The scorecard identifies Bugbot threads by author login, and the login is the one thing you should not guess. GitHub’s GraphQL API returns bot logins without the [bot] suffix that the REST API shows, so a value copied from the web interface will not match.
Create the project and a token first.
mkdir bugbot-scorecard && cd bugbot-scorecard
python3.12 -m venv .venv && source .venv/bin/activate
mkdir -p scorecard tests data .cursor/config .github/workflows
touch scorecard/__init__.py
pip install pytest
export GITHUB_TOKEN="$(gh auth token)"
For automation, create a fine-grained token with read-only access to Pull requests, Checks, and Metadata on the target repository. The scorecard never writes to GitHub, so give it no more than that. If your organization enforces SAML single sign-on, authorize the token for the organization or every query returns an access error.
The GraphQL client is 40 lines of standard library code with a retry for the 403 and 5xx responses GitHub returns under load.
import json
import os
import subprocess
import time
import urllib.error
import urllib.request
from functools import lru_cache
API = "https://api.github.com/graphql"
@lru_cache(maxsize=1)
def token() -> str:
env = os.environ.get("GITHUB_TOKEN")
if env:
return env
out = subprocess.run(["gh", "auth", "token"], capture_output=True, text=True, check=True)
return out.stdout.strip()
def run(query: str, variables: dict, tries: int = 4) -> dict:
body = json.dumps({"query": query, "variables": variables}).encode()
headers = {
"Authorization": f"bearer {token()}",
"Content-Type": "application/json",
"User-Agent": "bugbot-scorecard",
}
for attempt in range(tries):
request = urllib.request.Request(API, data=body, headers=headers)
try:
with urllib.request.urlopen(request, timeout=60) as response:
payload = json.load(response)
except urllib.error.HTTPError as err:
if err.code in (403, 502, 503) and attempt < tries - 1:
time.sleep(5 * pow(2, attempt))
continue
raise
if payload.get("errors") and not payload.get("data"):
raise RuntimeError(payload["errors"])
return payload["data"]
raise RuntimeError("GitHub GraphQL retries exhausted")
Now the discovery script. It scans review threads on the last 30 merged pull requests and tallies authors whose first comment contains a Bugbot marker such as the “Fix in Cursor” link that Bugbot adds to its findings.
import argparse
from collections import Counter
from scorecard import ghql
QUERY = """
query($owner: String!, $name: String!) {
repository(owner: $owner, name: $name) {
pullRequests(first: 30, states: [MERGED], orderBy: {field: UPDATED_AT, direction: DESC}) {
nodes {
reviewThreads(first: 50) {
nodes {
comments(first: 1) { nodes { body author { login __typename } } }
}
}
}
}
}
}
"""
MARKERS = ("Fix in Cursor", "Fix in Web", "Bugbot")
def main() -> None:
parser = argparse.ArgumentParser(description="Find the login Bugbot comments come from")
parser.add_argument("--repo", required=True, help="owner/name")
args = parser.parse_args()
owner, name = args.repo.split("/", 1)
data = ghql.run(QUERY, {"owner": owner, "name": name})
seen = Counter()
for pr in data["repository"]["pullRequests"]["nodes"]:
for thread in pr["reviewThreads"]["nodes"]:
comments = thread["comments"]["nodes"]
if not comments or not comments[0]["author"]:
continue
first = comments[0]
if any(marker in first["body"] for marker in MARKERS):
author = first["author"]
seen[(author["login"], author["__typename"])] += 1
if not seen:
print("No Bugbot-looking threads in the last 30 merged PRs.")
return
for (login, kind), count in seen.most_common():
print(f"{login:<24} {kind:<8} {count} threads")
if __name__ == "__main__":
main()
Run it from the project root:
python -m scorecard.discover --repo your-org/your-repo
The output lists each login with its GraphQL type and thread count. It looks like this:
cursor Bot 17 threads
Use whatever login your run prints for the --bot flag in every later command. The fixture data in this build uses cursor as the login, and your repository decides the real value. If a second line appears for a human login, a teammate quoted Bugbot’s text in their own comment. Ignore it.
Step 6: Fetch Merged Pull Requests With GraphQL #
REST would need one call per pull request for threads, one per commit for check runs, and one per comment for reactions. A single GraphQL query pulls all of that for 20 pull requests at a time.
import argparse
import json
from pathlib import Path
from scorecard import ghql
QUERY = """
query($owner: String!, $name: String!, $after: String) {
repository(owner: $owner, name: $name) {
pullRequests(first: 20, after: $after, states: [MERGED],
orderBy: {field: UPDATED_AT, direction: DESC}) {
pageInfo { hasNextPage endCursor }
nodes {
number
mergedAt
updatedAt
additions
deletions
author { login }
reviewThreads(first: 100) {
nodes {
isResolved
isOutdated
comments(first: 1) {
nodes {
body
author { login }
reactionGroups { content users { totalCount } }
}
}
}
}
commits(first: 50) {
nodes {
commit {
checkSuites(first: 10) {
nodes {
checkRuns(first: 10, filterBy: {checkName: "Cursor Bugbot"}) {
nodes { conclusion completedAt }
}
}
}
}
}
}
}
}
}
}
"""
def fetch(repo: str, since: str, until: str, max_pages: int) -> list[dict]:
owner, name = repo.split("/", 1)
after, kept = None, []
for _ in range(max_pages):
data = ghql.run(QUERY, {"owner": owner, "name": name, "after": after})
page = data["repository"]["pullRequests"]
for pr in page["nodes"]:
if since <= pr["mergedAt"][:10] <= until:
kept.append(pr)
oldest = min(pr["updatedAt"][:10] for pr in page["nodes"]) if page["nodes"] else since
if not page["pageInfo"]["hasNextPage"] or oldest < since:
break
after = page["pageInfo"]["endCursor"]
return kept
def main() -> None:
parser = argparse.ArgumentParser(description="Cache merged PRs with review threads and Bugbot checks")
parser.add_argument("--repo", required=True, help="owner/name")
parser.add_argument("--since", required=True, help="YYYY-MM-DD")
parser.add_argument("--until", default="2999-12-31", help="YYYY-MM-DD")
parser.add_argument("--out", default="data/prs.json")
parser.add_argument("--max-pages", type=int, default=15)
args = parser.parse_args()
prs = fetch(args.repo, args.since, args.until, args.max_pages)
Path(args.out).parent.mkdir(parents=True, exist_ok=True)
Path(args.out).write_text(json.dumps({"repo": args.repo, "prs": prs}, indent=2))
print(f"saved {len(prs)} merged PRs to {args.out}")
if __name__ == "__main__":
main()
Three design choices matter. The query orders by UPDATED_AT because GitHub offers no order by merge date, then filters on mergedAt in Python and stops paging once a whole page predates your window. The checkRuns(filterBy: {checkName: "Cursor Bugbot"}) argument keeps the payload small by returning only Bugbot’s runs, using the check name from Cursor’s documentation. Finally, the fixed ceilings (100 threads and 50 commits per pull request) keep each page well inside GitHub’s node limits. A pull request with more than 50 commits undercounts runs, which the troubleshooting section covers.
Fetch a month of history:
python -m scorecard.fetch --repo your-org/your-repo --since 2026-10-29
saved 38 merged PRs to data/prs.json
The count above is illustrative. The command writes a cache file, so every later step reads from disk and costs no API calls. Re-run fetch only when you want fresher data.
Steps 7 and 8: Classify Threads, Count Runs, Estimate Spend #
The scoring module is pure Python with no network access, which is why it can be tested offline. It turns each pull request into one row and each window into one summary.
from dataclasses import dataclass
from math import sqrt
COST_LOW, COST_HIGH = 1.00, 1.50
@dataclass
class PrRow:
number: int
merged: str
size: int
flags: int
resolved: int
outdated: int
open: int
thumbs_down: int
runs: int
findings_runs: int
@property
def acted_on(self) -> int:
return self.resolved + self.outdated
def first_comment(thread: dict) -> dict | None:
nodes = thread["comments"]["nodes"]
return nodes[0] if nodes else None
def is_bugbot(thread: dict, bot_login: str) -> bool:
comment = first_comment(thread)
author = comment and comment.get("author")
return bool(author) and author["login"] == bot_login
def state(thread: dict) -> str:
if thread["isResolved"]:
return "resolved"
return "outdated" if thread["isOutdated"] else "open"
def has_thumbs_down(thread: dict) -> bool:
groups = first_comment(thread)["reactionGroups"]
return any(g["content"] == "THUMBS_DOWN" and g["users"]["totalCount"] > 0 for g in groups)
def check_runs(pr: dict) -> list[dict]:
runs = []
for commit in pr["commits"]["nodes"]:
for suite in commit["commit"]["checkSuites"]["nodes"]:
runs.extend(r for r in suite["checkRuns"]["nodes"] if r["completedAt"])
return runs
def score_pr(pr: dict, bot_login: str) -> PrRow:
threads = [t for t in pr["reviewThreads"]["nodes"] if is_bugbot(t, bot_login)]
states = [state(t) for t in threads]
runs = check_runs(pr)
return PrRow(
number=pr["number"],
merged=pr["mergedAt"][:10],
size=pr["additions"] + pr["deletions"],
flags=len(threads),
resolved=states.count("resolved"),
outdated=states.count("outdated"),
open=states.count("open"),
thumbs_down=sum(has_thumbs_down(t) for t in threads),
runs=len(runs),
findings_runs=sum(1 for r in runs if r["conclusion"] in ("NEUTRAL", "FAILURE")),
)
def wilson(hits: int, total: int, z: float = 1.96) -> tuple[float, float]:
if total == 0:
return (0.0, 0.0)
p = hits / total
denom = 1 + z * z / total
centre = (p + z * z / (2 * total)) / denom
margin = z * sqrt(p * (1 - p) / total + z * z / (4 * total * total)) / denom
return (max(0.0, centre - margin), min(1.0, centre + margin))
def summarize(rows: list[PrRow]) -> dict:
flags = sum(r.acted_on + r.open for r in rows)
acted = sum(r.acted_on for r in rows)
runs = sum(r.runs for r in rows)
low, high = wilson(acted, flags)
mid_cost = runs * (COST_LOW + COST_HIGH) / 2
return {
"prs": len(rows),
"prs_with_flags": sum(1 for r in rows if r.flags),
"flags": flags,
"acted_on": acted,
"acted_on_rate": acted / flags if flags else 0.0,
"ci_low": low,
"ci_high": high,
"thumbs_down": sum(r.thumbs_down for r in rows),
"runs": runs,
"est_cost_low": runs * COST_LOW,
"est_cost_high": runs * COST_HIGH,
"cost_per_acted_flag": mid_cost / acted if acted else None,
}
Walk through the logic once, because every number in the report flows from it.
A thread belongs to Bugbot when its first comment’s author login equals the --bot value. Threads from humans never enter the totals. State resolution follows a fixed priority: a resolved thread counts as resolved even if it is also outdated, an unresolved outdated thread counts as outdated, and everything else is open. Acted-on is resolved plus outdated.
Check runs count only when completedAt is set, so queued and in-progress runs do not inflate the total. The findings_runs field counts runs that ended NEUTRAL or FAILURE. Cursor’s documentation says Bugbot reports findings as neutral by default, failure when the check is configured to fail on unresolved issues, and success only when there are no issues and no unresolved comments from earlier runs. A neutral run is therefore usually a run that found something, though Cursor also reports cancelled runs and internal errors as neutral.
Spend uses the two ends of Cursor’s published average, $1.00 and $1.50 per review. The summary multiplies completed runs by each end and divides the midpoint total by acted-on flags to get cost per acted-on flag. Treat that figure as a planning number. Real cost varies with pull request size, and Enterprise teams can pull exact cost_cents per review from the Bugbot analytics API.
Steps 9 and 10: Add Noise Signals and Render the Report #
The thumbs-down check in score.py is the Step 9 noise signal. Developers rarely click it, so a zero is weak evidence, but a nonzero count marks specific flags to read by hand. The report prints the total and the CSV keeps it per pull request.
Step 10 is the report script, which formats the summary as Markdown and writes the per-pull-request rows to CSV.
import argparse
import csv
import json
import sys
from pathlib import Path
from scorecard.score import PrRow, score_pr, summarize
def load_rows(path: str, bot: str, exclude: set[int]) -> list[PrRow]:
data = json.loads(Path(path).read_text())
return [score_pr(pr, bot) for pr in data["prs"] if pr["number"] not in exclude]
def pct(value: float) -> str:
return f"{value * 100:.1f}%"
def money(value: float | None) -> str:
return "n/a" if value is None else f"${value:,.2f}"
def summary_table(title: str, s: dict) -> str:
return "\n".join([
f"### {title}",
"",
"| Metric | Value |",
"|---|---|",
f"| Merged PRs scored | {s['prs']} |",
f"| PRs with at least one Bugbot flag | {s['prs_with_flags']} |",
f"| Bugbot flags | {s['flags']} |",
f"| Acted on (resolved or outdated) | {s['acted_on']} |",
f"| Acted-on rate | {pct(s['acted_on_rate'])} (95% CI {pct(s['ci_low'])} to {pct(s['ci_high'])}) |",
f"| Flags with a thumbs-down | {s['thumbs_down']} |",
f"| Bugbot check runs | {s['runs']} |",
f"| Estimated spend | {money(s['est_cost_low'])} to {money(s['est_cost_high'])} |",
f"| Cost per acted-on flag (midpoint) | {money(s['cost_per_acted_flag'])} |",
"",
])
def write_csv(rows: list[PrRow], path: str) -> None:
with open(path, "w", newline="") as handle:
writer = csv.writer(handle)
writer.writerow(["pr", "merged", "size", "flags", "resolved", "outdated",
"open", "thumbs_down", "runs", "findings_runs"])
for r in rows:
writer.writerow([r.number, r.merged, r.size, r.flags, r.resolved, r.outdated,
r.open, r.thumbs_down, r.runs, r.findings_runs])
def main() -> None:
parser = argparse.ArgumentParser(description="Render the Bugbot scorecard")
parser.add_argument("--data", default="data/prs.json")
parser.add_argument("--bot", required=True, help="login found by discover.py")
parser.add_argument("--split", help="YYYY-MM-DD: compare PRs merged before and on/after this date")
parser.add_argument("--exclude", default="", help="comma-separated PR numbers to drop")
parser.add_argument("--csv", help="write per-PR rows to this path")
parser.add_argument("--fail-under", type=float, help="exit 1 when the CI upper bound falls below this rate")
args = parser.parse_args()
exclude = {int(x) for x in args.exclude.split(",") if x}
rows = load_rows(args.data, args.bot, exclude)
if args.csv:
write_csv(rows, args.csv)
if args.split:
before = [r for r in rows if r.merged < args.split]
after = [r for r in rows if r.merged >= args.split]
print(summary_table(f"Before {args.split}", summarize(before)))
print(summary_table(f"From {args.split}", summarize(after)))
else:
print(summary_table("All merged PRs in the window", summarize(rows)))
overall = summarize(rows)
if args.fail_under and overall["flags"] >= 10 and overall["ci_high"] < args.fail_under:
print(f"FAIL: acted-on rate ceiling {pct(overall['ci_high'])} is under {pct(args.fail_under)}")
sys.exit(1)
if __name__ == "__main__":
main()
Run it against the bundled demo fixture to see the output without touching GitHub. The fixture builder in the complete project section writes eight synthetic pull requests, so the numbers below are demo data, not a real repository.
python -m scorecard.fixtures
python -m scorecard.report --data data/demo.json --bot cursor
### All merged PRs in the window
| Metric | Value |
|---|---|
| Merged PRs scored | 8 |
| PRs with at least one Bugbot flag | 6 |
| Bugbot flags | 14 |
| Acted on (resolved or outdated) | 9 |
| Acted-on rate | 64.3% (95% CI 38.8% to 83.7%) |
| Flags with a thumbs-down | 1 |
| Bugbot check runs | 13 |
| Estimated spend | $13.00 to $19.50 |
| Cost per acted-on flag (midpoint) | $1.81 |
Read the confidence interval before the rate. A point estimate from a small sample comes with a wide band that fits both a mediocre story and an excellent story about Bugbot. A handful of flags cannot separate the two, which is why the prerequisites asked for many pull requests.
Step 11: A/B Test a Rule Change With Confidence Intervals #
Rule changes are the main lever you control. The --split flag compares pull requests merged before a date with those merged on or after it. Commit your rule change, note the merge date, and let real pull requests accumulate.
python -m scorecard.report --data data/demo.json --bot cursor --split 2026-11-01
### Before 2026-11-01
| Metric | Value |
|---|---|
| Merged PRs scored | 4 |
| PRs with at least one Bugbot flag | 3 |
| Bugbot flags | 8 |
| Acted on (resolved or outdated) | 4 |
| Acted-on rate | 50.0% (95% CI 21.5% to 78.5%) |
| Flags with a thumbs-down | 1 |
| Bugbot check runs | 7 |
| Estimated spend | $7.00 to $10.50 |
| Cost per acted-on flag (midpoint) | $2.19 |
### From 2026-11-01
| Metric | Value |
|---|---|
| Merged PRs scored | 4 |
| PRs with at least one Bugbot flag | 3 |
| Bugbot flags | 6 |
| Acted on (resolved or outdated) | 5 |
| Acted-on rate | 83.3% (95% CI 43.6% to 97.0%) |
| Flags with a thumbs-down | 0 |
| Bugbot check runs | 6 |
| Estimated spend | $6.00 to $9.00 |
| Cost per acted-on flag (midpoint) | $1.50 |
The demo shows the trap in miniature. The acted-on rate climbed from 50.0% to 83.3% and the cost per acted-on flag dropped from $2.19 to $1.50, which looks like a clear win. Yet the two intervals overlap, so the data cannot rule out luck. Declare an improvement only when the lower bound of the new window clears the upper bound of the old one, or when you have enough flags that the bands narrow.
Change one variable per experiment. Switching the effort level, adding three rules, and turning on Autofix in the same week leaves you unable to say which change moved the numbers. Cursor’s rule analytics in Bugbot Automations report issues found, pull requests reviewed, accepted issues, and acceptance rate per rule, which helps attribute a shift to a specific rule after the fact.
Step 12: Automate the Scorecard With GitHub Actions #
A scorecard you run by hand gets run twice. This workflow fetches the last 30 days every Monday, appends the report to the job summary, and uploads the CSV.
name: bugbot-scorecard
on:
schedule:
- cron: "0 7 * * 1"
workflow_dispatch:
permissions:
contents: read
pull-requests: read
checks: read
jobs:
score:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Fetch and score the last 30 days
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
SINCE=$(date -u -d '30 days ago' +%F)
python -m scorecard.fetch --repo "$GITHUB_REPOSITORY" --since "$SINCE"
python -m scorecard.report --bot cursor --csv data/latest.csv \
--fail-under 0.40 | tee -a "$GITHUB_STEP_SUMMARY"
- uses: actions/upload-artifact@v4
with:
name: bugbot-scorecard
path: data/latest.csv
The --fail-under 0.40 flag has a deliberate guard. The job fails only when the report has at least 10 flags and the upper end of the confidence interval sits below 40%. A noisy week with five flags never trips it, but a quarter of consistently poor results does. Set the threshold to a rate your team would call a failure, and replace the --bot value with the login your discovery run printed. The job scores the repository it runs in, so commit the scorecard folder there, or pass another --repo and a token that can read it.
The built-in GITHUB_TOKEN is enough here because the three permissions listed are read-only. Scheduled workflows run from the default branch, so merge the file before expecting the first run. Use the workflow_dispatch trigger to test it immediately from the Actions tab.
Common Pitfalls That Skew a Bugbot Scorecard #
Most bad scorecards fail on interpretation, not code. These are the mistakes that produce confident and wrong numbers.
- Treating “resolved” as “correct.” Developers resolve threads to dismiss false positives as often as to mark fixes. Sample ten resolved threads by hand each month and note how many were dismissals. If four of ten were, discount the acted-on rate accordingly.
- Judging a rule change on eight pull requests. The demo in Step 11 shows a 33-point jump that the confidence intervals cannot confirm. Wait for 30 or more pull requests per window before declaring a win.
- Changing two variables at once. Effort level, rules, and Autofix each move the numbers. Alter one per window and record the date in your changelog.
- Ignoring run counts. Under
everyPush, a pull request with eight commits can trigger eight reviews. A team that pushes fixup commits constantly pays more than a team that pushes once, with identical findings. CompareoncePerPragainsteveryPushin an experiment. - Forgetting the learning passes. With Automatically Learn Rules on, Bugbot runs a learning pass whenever a pull request merges or closes. That pass uses Bugbot usage like a review and posts nothing, so it never appears in your check-run count. Your invoice runs higher than the estimate by that amount.
- Counting outdated threads as proof of a fix. A refactor can touch the commented lines for unrelated reasons. Outdated is a softer signal than resolved, and the CSV lets you split the two.
- Scoring through an outage. A GitHub Git-operations degradation on November 3, 2026 reportedly slowed Cursor repository cloning, Cloud Agent startup, and Bugbot runs between 21:40 and 22:53 UTC. Pull requests merged during provider incidents deserve the
--excludeflag. - Mixing bot-authored pull requests into human data. Bugbot caps how many reviews it runs on pull requests that bot accounts open, per team. Dependency-update bots can skew both flags and spend, so filter them or score them separately.
- Comparing windows with different pull request sizes. A month of 900-line refactors will not match a month of 40-line fixes. The CSV keeps a
sizecolumn so you can bucket by diff size before concluding anything.
Troubleshooting: 12 Failures and Their Fixes #
Problems cluster into three groups: Bugbot itself, the numbers, and API access.
Bugbot Is Silent or Misbehaving
- No reviews appear on any pull request. Open Bugbot in Automations and confirm the repository is switched on. Then confirm your plan: Free and Plus exclude Bugbot. Finally, check on-demand usage. On individual plans with on-demand disabled, Bugbot s until the next billing cycle resets your limits.
- Reviews work on some branches only. Draft pull requests are skipped unless
triggers.draftsis true in the YAML or you enabled reviews on drafts in your personal settings. Commentbugbot runto force a manual review. - Bugbot skips a large pull request. Bugbot declines pull requests above its review-size limit, measured in changed lines and diff characters, and posts a comment asking you to split the change. A skipped run records no usage. Files marked
linguist-generatedin.gitattributesdo not count toward the limit, so mark lockfiles and generated code. - Activation does nothing after a repository transfer. ACursor forum thread from November 2026 describes this after a transfer plus an account change. Reconnect the provider in the dashboard Integrations tab and confirm the new owner has granted repository access.
- Rules seem ignored. Run
bugbot run verbose=true. The table lists which rules loaded and flags truncated or omitted ones. If your rules live in.cursor/rules/*.mdc, move them, because those files do not apply to Bugbot. Check that no single rule passes 30,000 characters. - Config changes have no effect. Bugbot reads
bugbot.yamlfrom the pull request’s base branch, so a change inside the pull request itself never applies to that pull request. Merge first. Also check the file stays under 64 KB and that every key matches the documented names.
The Numbers Look Wrong
- Zero runs counted but findings exist. The check name must match. On GitHub it is the Cursor Bugbot check, while Bitbucket uses the build status key
cursor-bugbotand Azure DevOps uses the contextcursor-bugbot/review. Pull requests with many commits can also be cut short by thefirstargument on the commits connection. Raise it and accept the heavier query. - Acted-on rate sits at 100%. Either the sample is tiny or the team bulk-resolves threads before merging. Check
flagsper pull request in the CSV, then read a handful of resolved threads. - Flags are zero for every pull request. The
--botvalue does not match. Re-run discovery and copy the exact login. GraphQL drops[bot], socursor[bot]will never match. - Spend estimate disagrees with the invoice. The estimate uses Cursor’s $1.00 to $1.50 average, includes cancelled runs, and excludes learning passes. Enterprise teams can reconcile exact
cost_centsthrough the analytics API in the next section.
API and Token Errors
- “Resource not accessible by personal access token.” The token lacks read access to Pull requests or Checks on that repository. Regenerate it with those scopes and authorize it for the organization if SSO is enforced.
- 403 or 502 responses mid-fetch. GitHub applies secondary rate limits to heavy GraphQL queries. The client retries with backoff, but if it still fails, lower
first: 20tofirst: 10infetch.pyand re-run. The cache is only written at the end, so a failed run loses nothing.
Advanced Tips for Teams and Enterprise Admins #
Cross-check against Cursor’s own analytics. Enterprise teams can call GET /analytics/team/bugbot-reviews with an API key that has read:* scope. Each item carries cost_cents, pr_author, bugs_found, and per-finding resolution_status and severity. This replaces the cost estimate with real figures and gives you severity, which GitHub threads do not expose.
curl --get https://api.cursor.com/analytics/team/bugbot-reviews \
-u "$CURSOR_API_KEY:" \
--data-urlencode 'startDate=2026-11-01' \
--data-urlencode 'repo=github.com/your-org/your-repo' \
--data-urlencode 'pageSize=250' \
| jq '[.data[].bugs[]] | group_by(.resolution_status) | map({status: .[0].resolution_status, n: length})'
Cursor’s documentation notes that cost_cents is null when a review is not billed separately and that analytics can lag briefly after a review finishes. Since November 3, 2026, the endpoint also returns cost_cents for seat-based and free-trial reviews, plus a billed field, according to Cursor’s release notes.
Replay a pull request at a different effort level. POST /bugbot/review accepts a prUrl and a dryRun flag. A dry run executes the full analysis without posting comments, checks, or other side effects on the host. It still persists findings and bills like a normal review, so run it on a short list of representative pull requests. Retrieve results with the same analytics endpoint using dryRun=true, and match each one by the request_id the trigger returned. That gives you a controlled High-versus-Default comparison on identical diffs, which no before-and-after window can match.
Review before you push. In Cursor 3.7 or newer, run /review-bugbot from the agent input. Cursor stores the Git patch ID of the diff it reviewed, and when Bugbot later sees a pull request with the same patch ID it skips the remote review and comments that it already covered that diff. You get fixes before pushing and avoid paying twice. A third-party reference such as Aftergradient’s Bugbot guide is useful for cross-checking effort levels and rules against Cursor’s own pages.
Teach Bugbot inline. Comment @cursor remember followed by a fact on any pull request and Bugbot saves it as a learned rule for future reviews. Learned rules count toward usage, so watch your run totals after enabling them.
Check how widely a tool is used in public code. Before you commit to a reviewer, our public repository footprint method shows how to gauge that with GitHub code search. For more developer tooling guides, browse the coding and dev tools section.
The Complete Working Project #
The finished repository has this layout:
bugbot-scorecard/
.cursor/
BUGBOT.md
config/bugbot.yaml
.github/workflows/scorecard.yml
scorecard/
__init__.py
ghql.py
discover.py
fetch.py
score.py
report.py
fixtures.py
tests/
test_score.py
data/ # created at runtime, add to .gitignore
Two files from the layout have not appeared yet. The first builds the demo fixture used in Steps 10 and 11, so the whole pipeline runs offline.
import json
from pathlib import Path
def thread(login: str, resolved: bool = False, outdated: bool = False, thumbs_down: bool = False) -> dict:
groups = [{"content": "THUMBS_DOWN", "users": {"totalCount": 1 if thumbs_down else 0}}]
comment = {"body": "finding", "author": {"login": login}, "reactionGroups": groups}
return {"isResolved": resolved, "isOutdated": outdated, "comments": {"nodes": [comment]}}
def run(conclusion: str) -> dict:
return {"conclusion": conclusion, "completedAt": "2026-11-01T10:00:00Z"}
def pr(number: int, merged: str, size: int, threads: list[dict], runs: list[dict]) -> dict:
suites = [{"checkRuns": {"nodes": runs}}]
return {
"number": number,
"mergedAt": f"{merged}T12:00:00Z",
"updatedAt": f"{merged}T12:00:00Z",
"additions": size - size // 4,
"deletions": size // 4,
"author": {"login": "dev"},
"reviewThreads": {"nodes": threads},
"commits": {"nodes": [{"commit": {"checkSuites": {"nodes": suites}}}]},
}
def demo_prs() -> list[dict]:
bot, human = "cursor", "alice"
return [
pr(101, "2026-10-06", 220, [thread(bot, resolved=True), thread(bot, outdated=True),
thread(bot, thumbs_down=True), thread(human)],
[run("NEUTRAL"), run("SUCCESS")]),
pr(102, "2026-10-09", 90, [thread(bot)], [run("NEUTRAL")]),
pr(103, "2026-10-15", 640, [thread(bot, resolved=True), thread(bot, resolved=True),
thread(bot), thread(bot)],
[run("NEUTRAL"), run("NEUTRAL"), run("SUCCESS")]),
pr(104, "2026-10-22", 30, [], [run("SUCCESS")]),
pr(105, "2026-11-03", 180, [thread(bot, resolved=True), thread(bot, resolved=True)],
[run("NEUTRAL"), run("SUCCESS")]),
pr(106, "2026-11-10", 310, [thread(bot, resolved=True), thread(bot, outdated=True), thread(bot)],
[run("NEUTRAL"), run("NEUTRAL")]),
pr(107, "2026-11-17", 75, [thread(bot, outdated=True)], [run("NEUTRAL")]),
pr(108, "2026-11-24", 40, [], [run("SUCCESS")]),
]
def main() -> None:
path = Path("data/demo.json")
path.parent.mkdir(parents=True, exist_ok=True)
path.write_text(json.dumps({"repo": "acme/demo", "prs": demo_prs()}, indent=2))
print(f"wrote {path}")
if __name__ == "__main__":
main()
The second is the test file. It checks that human threads are ignored, that state priority holds, that incomplete runs do not count, that the summaries match a hand count, and that the Wilson interval brackets the rate.
from scorecard.fixtures import demo_prs, pr, run, thread
from scorecard.score import is_bugbot, score_pr, state, summarize, wilson
def test_human_threads_are_ignored():
assert is_bugbot(thread("cursor"), "cursor")
assert not is_bugbot(thread("alice"), "cursor")
def test_state_priority():
assert state(thread("cursor", resolved=True, outdated=True)) == "resolved"
assert state(thread("cursor", outdated=True)) == "outdated"
assert state(thread("cursor")) == "open"
def test_score_pr_counts_flags_and_runs():
row = score_pr(demo_prs()[0], "cursor")
assert (row.flags, row.resolved, row.outdated, row.open) == (3, 1, 1, 1)
assert row.thumbs_down == 1
assert (row.runs, row.findings_runs) == (2, 1)
def test_incomplete_runs_do_not_count():
pending = {"conclusion": None, "completedAt": None}
row = score_pr(pr(1, "2026-11-01", 10, [], [pending, run("SUCCESS")]), "cursor")
assert row.runs == 1
def test_summary_matches_hand_count():
rows = [score_pr(p, "cursor") for p in demo_prs()]
before = summarize([r for r in rows if r.merged < "2026-11-01"])
after = summarize([r for r in rows if r.merged >= "2026-11-01"])
assert (before["flags"], before["acted_on"], before["runs"]) == (8, 4, 7)
assert (after["flags"], after["acted_on"], after["runs"]) == (6, 5, 6)
assert after["acted_on_rate"] > before["acted_on_rate"]
def test_wilson_interval_brackets_the_rate():
low, high = wilson(5, 6)
assert low < 5 / 6 < high
assert wilson(0, 0) == (0.0, 0.0)
Run the suite and the demo end to end:
python -m pytest -q
python -m scorecard.fixtures
python -m scorecard.report --data data/demo.json --bot cursor --split 2026-11-01 --csv data/demo.csv
...... [100%]
6 passed
Swap data/demo.json for data/prs.json once you have run the fetch step against a real repository. The full flow on real data is three commands: python -m scorecard.discover --repo your-org/your-repo, then python -m scorecard.fetch --repo your-org/your-repo --since 2026-10-29, then python -m scorecard.report --bot <login> --csv data/latest.csv. Everything the report prints derives from score.py, so the tests are the contract. When you change a definition, change the test first.
Frequently Asked Questions #
How much does a Cursor Bugbot review cost? Cursor puts the average review at $1.00 to $1.50, depending on pull request size and complexity. Teams are billed from on-demand usage per review. Individual plans bill from included usage first, then on-demand usage if enabled. The old $40 per seat per month subscription is legacy pricing, and existing customers move to usage-based billing at their first renewal after June 8, 2026.
Is Bugbot available on the Free or Plus plan? No. Cursor’s pricing table lists Bugbot as unavailable on Free and Plus. It is available on Premium at $30 a month, Super at $100, Ultra at $200, and on Teams and Enterprise plans. If you are still choosing an editor, our Cursor versus Claude Code plan comparison lists entry prices side by side.
What is a good Bugbot hit rate? Cursor claims 70% or more of flags get resolved before merge. Treat that as a vendor benchmark, not a pass mark. Compare your own acted-on rate and its confidence interval across months, and hold the rate against your thumbs-down count and a hand-checked sample.
Do my .cursor/rules files apply to Bugbot? No. Project rules in .cursor/rules/*.mdc do not apply to Bugbot runs. Put review guidance in .cursor/BUGBOT.md, which Bugbot reads from the repository root and from folders above each changed file, or in rules configured in Bugbot Automations.
How do I trigger Bugbot manually? Comment cursor review or bugbot run on the pull request. Add verbose=true to see which rules loaded and to get a request ID. Bugbot ignores these commands when a bot account or GitHub App posts them.
How many pull requests do I need before the scorecard means anything? Aim for at least 30 merged pull requests with Bugbot active and 10 or more flags per window. Below that, the confidence interval spans most of the scale, as the demo data shows with intervals running from 21.5% to 78.5%.
Does the scorecard work on GitLab, Bitbucket, or Azure DevOps? Bugbot reviews those hosts, but this build queries GitHub’s GraphQL API. You would replace fetch.py with the host’s equivalent calls and use that host’s Bugbot status name, such as cursor-bugbot on Bitbucket.
Where does Bugbot get its model? Cursor said in June 2026 that Composer 2.5 powers Bugbot, and that the product respects organization model block lists by falling back to the next best available model when Composer 2.5 is opted out. Speed and quality can vary with your configuration.