Skip to content

Tag thread and message telemetry with who started the work - #5947

Merged
brsbl merged 10 commits into
mainfrom
bb/work-origin-telemetry
Oct 21, 2026
Merged

brsbl merged 10 commits into
mainfrom
bb/work-origin-telemetry

Conversation

@brsbl

@brsbl brsbl commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Usage telemetry couldn't tell work a person started from work an automation, plugin, agent or bb itself started. So activity from scheduled runs looked like people coming back.

What changed

  • thread_created and user_message_sent now carry initiator: user, agent, automation, plugin or system.
  • A plugin's message into an existing thread now reports that plugin, so automation runs count as automation.
  • bb thread spawn inside a working agent's turn now counts as agent.
  • On by default; BB_FF_INITIATOR_TELEMETRY=false turns it off. Nothing is sent while telemetry is off.

How you verified

  • Remote CI passed, including new tests for each initiator value and the flag.
  • A local build sent user, automation, agent and user for each case, as expected.
  • With telemetry turned off, the same build sent no events.

BB-Thread-ID: thr_nq42ntdw95

AGENT GENERATED

🤖 Generated with Claude Code

brsbl and others added 4 commits October 21, 2026 00:41
… an off-by-default flag

Adds work_origin (person, agent, automation, plugin, system) to thread_created
and user_message_sent when BB_FF_WORK_ORIGIN_TELEMETRY is on, so retention reads
can separate person-started work from scheduled automation runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… flag in parsed configs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follows PostHog and Segment naming guidance and bb's snake_case event fields:
the property says who started the work. The internal initiator system maps to
the value bb.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@brsbl brsbl changed the title Tag thread and message telemetry with an anonymous work origin (off by default) Tag thread and message telemetry with who started the work (started_by, off by default) Oct 21, 2026
Matches bb's domain initiator (user | agent | system) and avoids PostHog's
reserved person term, per the shared analytics schema vocabulary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@brsbl brsbl changed the title Tag thread and message telemetry with who started the work (started_by, off by default) Tag thread and message telemetry with who initiated the work (initiator, off by default) Oct 21, 2026
brsbl and others added 5 commits October 21, 2026 03:49
…or telemetry

Plugin SDK sends now carry originPluginId, so automation runs into an existing
thread report automation. bb thread spawn sends BB_THREAD_ID as senderThreadId,
and the new thread reports agent when that sender has a turn running.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without it the plugin SDK's attribution was dropped before the request left,
so automation runs into an existing thread still reported initiator user.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-21T05:34:27.762852Z
We couldn’t complete this review. Comment @codex review to try again.
0789734 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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 changed the title Tag thread and message telemetry with who initiated the work (initiator) Tag thread and message telemetry with who started the work Oct 21, 2026
@brsbl
brsbl merged commit 6601358 into main Oct 21, 2026
48 checks passed
@brsbl
brsbl deleted the bb/work-origin-telemetry branch October 21, 2026 06:58
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