Repository navigation
Conversation
turn_finished is captured on the server when a root agent turn ends: on turn completion, on a provider process exit, and when a turn's start command fails. Each reports the outcome, a built-in provider id or "other", a coarse error category mapped from the provider's error classification (never error text), and whether this was the install's first finished turn. A one-time app-settings marker claims the first turn, and installs that already had several top-level threads never claim it. device_paired is added to the client telemetry allow-list. The server captures it when a new machine enrolls (not its own machine, not a re-enrollment), and the Push Notifications plugin reports it when a new iOS or Android device registers. Each carries only the device kind and whether it is the first of that kind. Both respect the usage-data opt-out. Privacy copy, configuration docs, the API audit entry, and the Push Notifications overview describe them. Plugin SDK 0.6.41. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
brsbl
added this pull request to stack #5232
October 10, 2026 03:34
…ines Every turn end now reports from applyLoggedThreadLifecycleEvent beside the turn.failed announcement, deferred past the transaction. That covers server-settled stops, host disconnects, daemon restarts, and provisioning failures that never pass through event effects, and a fork seed settling from starting is not counted. The failure category comes from the latest system error since the turn started, else the provider's classification. The first-turn marker is claimed once per process instead of on every turn. device_paired for machines now fires only for join-code enrollments, so a fresh install no longer reports its own machine. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The overview was already at the 4,000-character marketplace limit, so the usage-data note lives only in the privacy page and configuration docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Core no longer lists provider ids. turn_finished reports a provider id only when a bundled plugin's manifest declares it, so custom ACP agents and third-party providers still report as other. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
enrollHost returned only the host id, so the route could not tell a join-code enrollment from the server's own loopback one and never reported machines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
bb couldn't see whether an agent turn finished or broke, so a new install whose first run failed looked the same as one whose user simply left. It also couldn't see whether people added a phone or another machine. No usage event covered either one.
What changed
turn_finished(server-side,apps/server/src/services/system/turn-telemetry.ts)applyLoggedThreadLifecycleEvent, beside the existingturn.failedannouncement, so every appliedrun.succeeded,run.failed, orstop.settledreports exactly once. That includes provisioning failures, host disconnects, daemon restarts, and server-settled stops. A fork seed settling fromstartingis not a turn and isn't counted. The report is deferred past the transaction.outcome:completed,failed, orstopped.provider: a provider id declared in a bundled plugin's manifest (experimental_providers). Any custom ACP agent or third-party provider is reported asother, so private agent names never leave the server. Core holds no provider literals.error_category: a fixed enum. It comes from the latest system error since the turn started (process_exited,start_failed,host_lost), otherwise from the provider's own error classification via the same lookupturn.faileduses. It never contains error text.first_turn: claimed once through an app-settings marker (claimFirstFinishedTurn). Installs that already had more than one top-level thread before the marker existed never claim it.device_paired(added to the client telemetry allow-list)internal/hosts.ts). The server's own machine and re-enrollments of an existing host don't count.mobile_iosormobile_androidwhen a new device registers.first_of_kind. No labels, push tokens, hostnames, or ids.Both events
docs/configuration.md, and theapi_to_audit.mdentry describe them. The Push Notifications overview is already at its 4,000-character marketplace limit, so it isn't changed.bbPluginSdk >=0.6.41.Stack: this PR sits on top of #5316.
device_pairedfrom the plugin needs #5222's telemetry route, and the docs extend the same paragraph.How you verified
Privacy page telemetry paragraph (Chrome for Testing, local
apps/web, 2×):failed/process_exitedand hides a custom provider id asother;failed, a settled stop reportsstopped, and a fork seed settling reports nothing.mobile_ios, first; a second one reports not-first; re-registering the same token reports nothing.thread_createdanduser_message_sent, which still send raw provider ids;machineserver-only in the schema;first_turnon prior turn history for upgraded single-thread installs;errorInfoinstead of building the fullturn.failedpayload.BB-Thread: Retention measurement
🤖 Generated with Claude Code