●CC 2.1.332 — No new Claude Code release over the weekend. 2.1.332 (11/25) is still current●ANALYTICS — A fix to search counts in the Enterprise Analytics API may raise numbers from 11/17 onward●SONNET 4.5 — Today, 11/30, is Sonnet 4.5's last day on the Claude API. Move to claude-sonnet-5-5●USAGE — Some users report weekly usage jumping right after upgrading to a higher plan●NEW — New: Does what a Project remembers carry over into your everyday chats?●BILLING — More readers are looking for what to check when a payment won't go through●CC 2.1.332 — No new Claude Code release over the weekend. 2.1.332 (11/25) is still current●ANALYTICS — A fix to search counts in the Enterprise Analytics API may raise numbers from 11/17 onward●SONNET 4.5 — Today, 11/30, is Sonnet 4.5's last day on the Claude API. Move to claude-sonnet-5-5●USAGE — Some users report weekly usage jumping right after upgrading to a higher plan●NEW — New: Does what a Project remembers carry over into your everyday chats?●BILLING — More readers are looking for what to check when a payment won't go through
Watching a Play Store Staged Rollout with Claude Code — Automating the Halt with Per-Version Crash Rates
How I built, with Claude Code, a staged-rollout monitor that compares per-version crash rates from the Play Developer Reporting API, judges them with a Wilson interval, and halts the release through the Publishing API only when it gets worse.
It was the week I shipped a larger update to the Android version of my wallpaper app. On the morning after the staged rollout reached 100%, I opened Android Vitals in Play Console and saw a crash graph with a shape I didn't recognize. The culprit was an IndexOutOfBoundsException at the moment a RecyclerView swapped its adapter — something I had never once reproduced on my own devices.
I had been doing a staged rollout. So why didn't I notice before 100%? Looking back, the graph I watched blended the old and new versions together, and I was reading it with the eyes of someone who expects "a few crashes, as usual." A staged rollout limits how many people get hurt. It doesn't tell you that people are getting hurt. I had mixed those two up, and I only saw it clearly after the fix had shipped.
What follows is the monitor I rebuilt with Claude Code afterwards. The short version is the division of labor I ended up with: the math decides, Claude explains, the machine halts, and I widen. I'll walk through fetching, deciding, halting, and keeping a record, with code that runs.
What should you compare to know when to stop?
My first version read Play Console's crash-free users figure and used fixed lines: warn below 99.7%, stop below 99.5%. It ran. It also didn't work well, for two reasons.
The number didn't separate versions. During a staged rollout most people are still on the old build, so the new build's crashes get diluted. A new build at 5% could double its crash rate and the blended figure would barely move.
And daily numbers wobble. A wallpaper app is used differently on weekends, so comparing Tuesday's number for a rollout that started Monday against the previous version's 28-day average isn't really a comparison.
So I rewrote the comparison as one rule:
Compare the new and old versions, on the same day, with the same metric.
The metric is the user-perceived crash rate — the share of users who hit at least one crash while actively using the app — because that's what Google Play uses for its quality bar. As of November 2026, Android Developers' Vitals documentation lists the overall bad behavior threshold at 1.09%, and 8% per phone model; for user-perceived ANRs it's 0.47% overall and 8% per phone model. My decision logic treats the official line as the last fence and draws my own app-specific line in front of it.
Step 1: Fetch per-version, per-day crash rates from the Reporting API
The fetch code I first wrote with Claude Code tried to call vitals on the androidpublisher (Publishing API) client, and it never worked. Vitals data lives in a separate API — the Play Developer Reporting API (playdeveloperreporting.googleapis.com) — with its own scope, https://www.googleapis.com/auth/playdeveloperreporting. Splitting the two is what this rewrite does.
You need three things first: enable the Reporting API in Google Cloud, create a service account and keep its key file, and invite that service account under Users and permissions in Play Console with access to view the app. Please check the exact permission names in your own Play Console, since I can't promise they'll read the same in every account.
# vitals_fetch.py# Fetch the user-perceived crash rate per version and per day from the Play Developer Reporting APIimport osimport datetime as dtfrom google.oauth2 import service_accountfrom googleapiclient.discovery import buildPACKAGE = os.environ.get("PLAY_PACKAGE", "com.example.wallpapers")KEY_FILE = os.environ.get("PLAY_SA_KEY", "service_account.json")SCOPES = ["https://www.googleapis.com/auth/playdeveloperreporting"]LA = {"id": "America/Los_Angeles"} # DAILY aggregation only accepts this time zonedef client(): cred = service_account.Credentials.from_service_account_file(KEY_FILE, scopes=SCOPES) return build("playdeveloperreporting", "v1beta1", credentials=cred, cache_discovery=False)def latest_daily_end(svc) -> dict: """Return the latest date available for DAILY data (latestEndTime).""" ms = svc.vitals().crashrate().get(name=f"apps/{PACKAGE}/crashRateMetricSet").execute() for f in ms.get("freshnessInfo", {}).get("freshnesses", []): if f.get("aggregationPeriod") == "DAILY": return f["latestEndTime"] raise RuntimeError("No DAILY freshness info")def _dec(m: dict, key: str = "decimalValue") -> float | None: v = m.get(key, {}).get("value") return float(v) if v is not None else Nonedef query_versions(svc, version_codes: list[int], days: int = 3) -> list[dict]: end = latest_daily_end(svc) end_t = {"year": end["year"], "month": end["month"], "day": end["day"], "timeZone": LA} s = dt.date(end["year"], end["month"], end["day"]) - dt.timedelta(days=days) start_t = {"year": s.year, "month": s.month, "day": s.day, "timeZone": LA} out = [] for vc in version_codes: # one query per version, equality filter only body = { "timelineSpec": {"aggregationPeriod": "DAILY", "startTime": start_t, "endTime": end_t}, "dimensions": ["versionCode"], "metrics": ["userPerceivedCrashRate", "crashRate", "distinctUsers"], "filter": f"versionCode = {vc}", "pageSize": 1000, } res = svc.vitals().crashrate().query(name=f"apps/{PACKAGE}/crashRateMetricSet", body=body).execute() for row in res.get("rows", []): st = row["startTime"] rec = {"date": f'{st["year"]}-{st["month"]:02d}-{st["day"]:02d}', "version_code": vc} for m in row.get("metrics", []): rec[m["metric"]] = _dec(m) ci = m.get("decimalValueConfidenceInterval") if ci: # prefer the API's own interval when it returns one rec[m["metric"] + "_ci"] = (float(ci["lowerBound"]["value"]), float(ci["upperBound"]["value"])) out.append(rec) return sorted(out, key=lambda r: (r["date"], r.get("version_code", 0)))if __name__ == "__main__": import json, sys codes = [int(x) for x in sys.argv[1:]] or [310, 311] print(json.dumps(query_versions(client(), codes), ensure_ascii=False, indent=2))
The code handles four quirks that the official reference spells out:
The end date comes from freshnessInfo.latestEndTime, not from today. Data lags, and asking for a day that hasn't been aggregated yet just returns nothing.
DAILY data is bucketed in America/Los_Angeles. "Yesterday" as I see it in Japan in the morning can be a different day.
distinctUsers is rounded to the nearest 10, 100, 1,000 and so on, depending on size, and the reference warns against aggregating it further because the same people get counted twice. So I decide one day at a time.
Values come back as google.type.Decimal strings. In my case the rate arrived as a fraction (0.0021 meaning 0.21%), but I'd ask you to check the unit once against what Play Console shows for the same day and version. Getting this wrong shifts every decision by a factor of 100.
I can't run this without real credentials in an article, so I checked the parsing with a fake client that returns responses in the shape the reference documents. Here is what it printed:
What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.
WHAT YOU'LL LEARN
✦Get fetch code that pulls the user-perceived crash rate per version and per day from the Play Developer Reporting API, so the new and old builds are compared on the same day
✦Use a Wilson-interval decision function, with its real test output, that avoids false alarms while only a few hundred people have the new build
✦Automate only the halt through the Publishing API, keep widening the rollout as a human call, and know what halting does not undo
Secure payment via Stripe · Cancel anytime
✦
Unlock This Article
Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.
Step 2: A decision that doesn't panic over small samples
On the first day of a 5% rollout, only a few hundred people have the new build. Two crashes make the rate jump, and the number alone can't tell you whether that's a regression or bad luck.
When I reframed the problem for Claude Code — "what goes wrong with a simple threshold when the sample is small?" — it suggested a Wilson interval for the binomial proportion. Instead of the observed rate, you judge by the range the true rate probably sits in, given how many people you've seen.
The first version I received had a reason string that contradicted its own decision: it said the interval "overlaps the old version" when the interval was clearly above it. I added tests and fixed it. Using generated code and checking generated code are two separate jobs. For anything that drives a release decision, I feed it the boundary values myself before it goes anywhere near production.
# rollout_decide.py# Compare old and new versions on the same day and decide the next rollout stepimport mathfrom dataclasses import dataclassPLAY_BAD_BEHAVIOR = 1.09 # overall user-perceived crash rate threshold (%)@dataclassclass DayStat: version_code: int users: int # distinctUsers (already rounded by the API) crash_rate: float # userPerceivedCrashRate, converted to %def wilson(rate_pct: float, n: int, z: float = 1.96) -> tuple[float, float]: """95% Wilson interval (%) for the share of users who crashed.""" if n <= 0: return (0.0, 100.0) p = rate_pct / 100 denom = 1 + z * z / n center = (p + z * z / (2 * n)) / denom half = z * math.sqrt(p * (1 - p) / n + z * z / (4 * n * n)) / denom return (max(0.0, center - half) * 100, min(1.0, center + half) * 100)def decide(new: DayStat, base: DayStat, min_users: int = 500, warn_pt: float = 0.10, halt_pt: float = 0.30) -> tuple[str, str]: """Return WAIT / PROCEED / WATCH / HALT and a reason.""" if new.users < min_users: return "WAIT", f"{new.users} users is not enough (need {min_users}+)" lo, hi = wilson(new.crash_rate, new.users) diff = new.crash_rate - base.crash_rate if new.crash_rate >= PLAY_BAD_BEHAVIOR: return "HALT", f"{new.crash_rate:.2f}% is at or above Play's {PLAY_BAD_BEHAVIOR}% threshold" worse = lo > base.crash_rate # even the lower bound beats the old rate: hard to call it luck if worse and diff >= halt_pt: return "HALT", f"+{diff:.2f}pt; lower bound {lo:.2f}% is still above old {base.crash_rate:.2f}%" if diff >= warn_pt: note = "clearly above old" if worse else "overlaps old" return "WATCH", f"+{diff:.2f}pt; interval {lo:.2f}-{hi:.2f}% {note}" return "PROCEED", f"{diff:+.2f}pt; interval {lo:.2f}-{hi:.2f}%"if __name__ == "__main__": base = DayStat(310, 52000, 0.21) cases = [ ("5% day 1", DayStat(311, 300, 0.67)), ("5% day 2", DayStat(311, 2600, 0.38)), ("25% day 1", DayStat(311, 13000, 0.24)), ("25% regress", DayStat(311, 13000, 0.62)), ("over Play", DayStat(311, 1200, 1.25)), ] for label, s in cases: d, why = decide(s, base) print(f"{label:<12} n={s.users:>6} rate={s.crash_rate:.2f}% -> {d:<7} {why}") assert decide(DayStat(1, 0, 0.0), base)[0] == "WAIT" assert wilson(0.0, 1000)[0] == 0.0 assert decide(DayStat(311, 13000, 0.62), base)[0] == "HALT" print("tests ok")
Output on Python 3.13 (the numbers are made up for illustration):
5% day 1 n= 300 rate=0.67% -> WAIT 300 users is not enough (need 500+)5% day 2 n= 2600 rate=0.38% -> WATCH +0.17pt; interval 0.21-0.70% overlaps old25% day 1 n= 13000 rate=0.24% -> PROCEED +0.03pt; interval 0.17-0.34%25% regress n= 13000 rate=0.62% -> HALT +0.41pt; lower bound 0.50% is still above old 0.21%over Play n= 1200 rate=1.25% -> HALT 1.25% is at or above Play's 1.09% thresholdtests ok
A word on reading it. On day 2 at 5%, the rate is nearly double the old build, but with 2,600 people the interval runs from 0.21% to 0.70% and still includes the old 0.21%. Halting there would be premature, so it waits as WATCH. At 25%, with 13,000 people, 0.62% has a lower bound above the old rate, which is hard to explain as chance — so it halts.
warn_pt and halt_pt are my app's values, not universal ones.
Drawing your own lines
Pull the daily user-perceived crash rate for your last three to five versions over their first two or three weeks, using the same API, and look at how much it moves day to day. I set warn_pt to "clearly bigger than an ordinary day's wobble" and halt_pt to roughly three times that. For min_users, I aim for the head count where the interval narrows to about the width of warn_pt. With an old rate near 0.2%, 500 people still gives a wide interval; it settles down in the low thousands. Once you've chosen your numbers, add your boundary values to the tests above, so you notice when a later edit moves them.
Step 3: Automate the halt, and only the halt
When the decision says HALT, the new build keeps going out while I'm getting to Play Console. So stopping is the one action I let the machine take. Using edits.tracks in the Publishing API (Google Play Developer API), it sets the matching production release to status: "halted" and commits — exactly the flow in the official "APKs and Tracks" guide.
# rollout_control.py# A small tool that only halts a production staged rollout. Dry-run by default.import os, sysfrom google.oauth2 import service_accountfrom googleapiclient.discovery import buildPACKAGE = os.environ.get("PLAY_PACKAGE", "com.example.wallpapers")KEY_FILE = os.environ.get("PLAY_SA_KEY", "service_account.json")SCOPES = ["https://www.googleapis.com/auth/androidpublisher"]def halt(version_code: int, apply: bool = False) -> str: cred = service_account.Credentials.from_service_account_file(KEY_FILE, scopes=SCOPES) ap = build("androidpublisher", "v3", credentials=cred, cache_discovery=False) edit_id = ap.edits().insert(packageName=PACKAGE, body={}).execute()["id"] track = ap.edits().tracks().get(packageName=PACKAGE, editId=edit_id, track="production").execute() target = None for rel in track.get("releases", []): if str(version_code) in rel.get("versionCodes", []) and rel.get("status") == "inProgress": target = rel if target is None: ap.edits().delete(packageName=PACKAGE, editId=edit_id).execute() return f"No inProgress release for versionCode {version_code} (nothing changed)" before = target.get("userFraction") target["status"] = "halted" if not apply: ap.edits().delete(packageName=PACKAGE, editId=edit_id).execute() return f"[dry-run] would halt {version_code} (userFraction={before})" ap.edits().tracks().update(packageName=PACKAGE, editId=edit_id, track="production", body=track).execute() ap.edits().commit(packageName=PACKAGE, editId=edit_id).execute() return f"Halted {version_code} at userFraction={before}"if __name__ == "__main__": vc = int(sys.argv[1]); print(halt(vc, apply="--apply" in sys.argv))
It defaults to dry-run because, for the first few rollouts, I wanted to see with my own eyes that a HALT was actually right. I only started passing --apply after the decision logic had been checked against reality a few times. Even a dry run creates an edit, so the script cleans up with edits.delete.
What I did not automate is widening — moving userFraction from 0.05 to 0.25.
The machine may stop a rollout. Only I widen one.
A halt can be undone by setting the release back to inProgress. A build that has already reached more people can't be taken back. Handing the machine only the actions I can reverse changed how my stomach reacts when a notification arrives.
Step 4: Let Claude write down why
If the decision and the halt are both code, where does Claude come in? For me, it's the record I reread before the next release. A log of bare numbers may well be unreadable to me six months from now. I pass the daily decisions as JSON and ask for a short note: what moved, where it hesitated, and what to change next time. It is not allowed to change the decision.
# rollout_note.py# Turn the decision log (JSON) into a short note to read before the next releaseimport json, os, sysimport anthropicMODEL = os.environ.get("CLAUDE_MODEL", "claude-sonnet-5-5") # a current model as of November 2026client = anthropic.Anthropic() # reads ANTHROPIC_API_KEY from the environmentdef write_note(log: list[dict]) -> str: prompt = ( "Below is the decision log for an Android app's staged rollout. The decisions " "(WAIT/PROCEED/WATCH/HALT) are final; do not change or re-evaluate them.\n" "1. Notable metric movements (or 'none')\n" "2. One sentence per WATCH or HALT day explaining why, using only numbers from the log\n" "3. One or two things to change in the next release\n" "No preamble. Do not introduce numbers that are not in the log.\n\n" + json.dumps(log, ensure_ascii=False, indent=2) ) msg = client.messages.create(model=MODEL, max_tokens=800, messages=[{"role": "user", "content": prompt}]) return msg.content[0].textif __name__ == "__main__": print(write_note(json.load(open(sys.argv[1], encoding="utf-8"))))
The "don't change the decision" and "no numbers that aren't in the log" lines are there because my first version produced notes that quietly re-argued the decision with guesses mixed in. The note exists for whoever rereads it; once new judgments slip in, you can no longer tell which parts are facts. The model ID is an environment variable so a model retirement doesn't mean editing code — as of November 2026, Sonnet 4.5 (claude-sonnet-4-5-20250929) on the Claude API has a published retirement date of November 30.
Choosing a data source
Manual CSV export from Play Console
Play Developer Reporting API
Firebase Crashlytics
Same metric as Play's quality bar
Yes (same definitions as the UI)
Yes (userPerceivedCrashRate and others)
No (crashes the SDK reports)
Per-version, per-day comparison
Manual, depends on UI filters
Mechanical, via versionCode and DAILY
Easy per version
Delay
Whatever the UI has
Up to latestEndTime (day-level lag)
Fast
Stack traces
No
Separate API (errors)
Yes
Setup cost
A download every time
A service account
SDK integration
In one sentence: decide whether to stop with the Reporting API, because it uses Play's own yardstick, and investigate causes with Crashlytics. Crashlytics notices sooner, but its numbers are defined differently from what Play looks at, so my stop line lives on Reporting API numbers. The CSV was plenty for gathering history to set the first lines.
When it doesn't work: a triage table
Symptom
Likely cause
How to check
Fix
403 PERMISSION_DENIED
Reporting API not enabled / scope still androidpublisher / service account not invited in Play Console
API status in Cloud Console; user list in Play Console
Enable the API, use the playdeveloperreporting scope, grant view access to the app
Empty rows
End date beyond latestEndTime / new build not aggregated yet / wrong versionCode
freshnessInfo from crashrate.get; versionCode on the release page
Align the end date to latestEndTime; filter by versionCode, not versionName
Rate is 100x off from the UI
Treating the Decimal as a percentage
Compare the same day and version in Play Console
If it is a fraction, multiply by 100 before deciding
Dates are a day off
DAILY buckets use America/Los_Angeles
Line up startTime against your local date
Use the API's dates as-is; don't convert them
Always WAIT
min_users too high for the rollout fraction
The trend in distinctUsers
Raise the first rollout fraction rather than lowering min_users
Halted, but crashes don't drop
People who already updated keep the build
Whether distinctUsers for the new build still grows
Ship a fix with a higher versionCode
Three common misunderstandings
"Halting is a rollback." According to Play Console Help on staged rollouts, a halt only stops the build from reaching additional users; people who already received it keep using it. For a release that was already at 100%, Play can serve the previous version to new and eligible users when you halt, but the Help page notes that if the release has been out for a long time, most users may already have it — and you can't halt the first release on a track. In the end, the remedy is a fixed build.
"Publishing API access lets me read Vitals too." Reading uses the Reporting API; halting uses the Publishing API. Different scopes. My first version stalled exactly here.
"The smaller the first stage, the safer." For a small app, 5% may never collect enough people to decide, and days pass in WAIT. If you widen during that time, you weren't really monitoring. For smaller apps I start with a larger first stage and make the HALT line stricter instead.
Running it day to day
I run the three scripts once a day in the Japan evening, around when the LA date has rolled over and the previous day shows up under latestEndTime. Claude Code wrote me a small shell wrapper that runs fetch → decide → (dry-run halt if HALT) → log, and only a single line goes to my notifications.
#!/usr/bin/env bash# daily_rollout_check.sh — once a day; tries to halt only on HALTset -euo pipefailNEW=311; OLD=310python3 vitals_fetch.py "$OLD" "$NEW" > vitals.jsonpython3 judge_from_json.py vitals.json "$OLD" "$NEW" > decision.json # thin layer that calls rollout_decide.decideDECISION=$(python3 -c 'import json;print(json.load(open("decision.json"))["decision"])')echo "$(date '+%F') $NEW $DECISION" >> rollout_history.logif [ "$DECISION" = "HALT" ]; then python3 rollout_control.py "$NEW" # stays dry-run until the logic has been checkedfi
judge_from_json.py is a dozen lines that pick the old and new rows for the same day out of the Step 1 JSON and pass them to decide(), so I've left it out. The one thing I'm careful about: if the old version has no row for that day, it doesn't decide at all. Judging from one side breaks the same-day rule.
The next place you'll get stuck: finding the cause after a halt
After a HALT, what you need is which crash went up. The Reporting API's crashrate tells you how many people crashed, not where. At that point I have Claude Code read the Crashlytics stack traces and connect them to changes in the diff. The RecyclerView crash from the opening turned out to be another thread modifying the list the adapter was holding; a defensive copy fixed it. I wrote up that process in 11 Days in Crashlytics: A Claude Code Debug Loop Across Two Android Wallpaper Apps.
Start by passing the versionCodes of your current build and the one before it to the Step 1 code, and put the same day's user-perceived crash rates side by side. That's where I started too. The moment the two numbers sit next to each other, you'll see how much the blended graph had been hiding.
Share
Thank You for Reading
Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.