Skip to content

Link anonymous thread and turn lifecycle events - #5318

Closed
brsbl wants to merge 17 commits into
bb/telemetry-automation-split-view-thr_gqshddt6w2from
bb/turn-and-device-telemetry-thr_gqshddt6w2
Closed

brsbl wants to merge 17 commits into
bb/telemetry-automation-split-view-thr_gqshddt6w2from
bb/turn-and-device-telemetry-thr_gqshddt6w2

Conversation

@brsbl

@brsbl brsbl commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Work events cannot reliably connect an accepted message to its turn, especially after queueing or retry.

What changed

  • Persist random analytics-only thread, parent, and message IDs separately from content and public thread records.
  • Report applied lifecycle transitions and coarse turn outcomes after commit, retaining queue groups and original acceptance timestamps.
  • Reuse retry provenance, exclude steering from turn origins, and report unavailable links without guessing.
  • Restrict new turn outcome provider values to shipped declarations, including after custom providers are disabled.

How you verified

  • Remote CI passed at 41e9b51b.
  • Privacy regressions failed before the fix and passed afterward on Linux and Windows.
  • Cumulative review covered the stack at 654570f7; its provider privacy finding is fixed and validated without repeating the review.
  • Exact-head app/server/daemon → deterministic ACP process → local capture verified root/child IDs, continuation, queued sends, stop, opt-out, restart persistence, and a disabled custom provider mapping to other.
  • A grouped queued send on the unchanged descendant 40972c58 emitted both accepted message IDs on turn_started and turn_finished. The original QA request used an incomplete expected queue prefix; correcting that fixture request completed the check.
  • Retry, steer, permission, and failure variants are covered in remote CI rather than every variant in the live pass.
Recorded P2 follow-ups
  • Soft deletion can clear analytics state before final runtime settlement; startup cancellation can lose the pending request link.
  • Retained-turn reconciliation can count another start; host interruption can be categorized as start_failed.
  • first_turn uses current root-thread count rather than historical first completion.
  • Request-origin lookup scans historical request JSON.

BB-Thread: Retention measurement

BB-Thread-ID: thr_gqshddt6w2

AGENT GENERATED

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>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@brsbl
brsbl added this pull request to stack #5232 October 10, 2026 03:34
brsbl and others added 4 commits October 9, 2026 20:47
…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>
@brsbl brsbl changed the title Report anonymous turn_finished and device_paired events Link anonymous thread and turn lifecycle events Oct 13, 2026
@brsbl

brsbl commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #5438 on main-based native stack #5440. The replacement preserves this implementation, validated provider privacy fix, and review history. Final replacement CI is green at a96641c after moving the unchanged ACP-next tests to the sequential Windows host shard. Local event-shape evidence is linked there. This PR is closed without merging; its branch and history remain.

@brsbl brsbl closed this Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant