Skip to content

Link accepted messages to anonymous turn events - #5472

Closed
brsbl wants to merge 1 commit into
bb/work-lifecycle-events-thr_swe8w7rxcmfrom
bb/work-request-links-thr_swe8w7rxcm
Closed

brsbl wants to merge 1 commit into
bb/work-lifecycle-events-thr_swe8w7rxcmfrom
bb/work-request-links-thr_swe8w7rxcm

Conversation

@brsbl

@brsbl brsbl commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Accepted messages could lose their anonymous link to later turn events. Replacing existing captures could suppress events when work telemetry was disabled.

What changed

  • Accepted messages remain linked to the turns they start through anonymous identifiers.
  • Message and queue boundaries preserve canonical initiators.
  • Creation and message events continue when work telemetry is disabled but anonymous telemetry remains enabled.

Stack order: #5947 → #5437 → #5477 → #5469 → #5470 → #5471 → #5472 → #5473 → #5439.

How you verified

  • Remote CI: accepted-message linkage checks passed. Run
  • End-to-end: message and turn events arrived with matching anonymous identifiers.

BB-Thread-ID: thr_swe8w7rxcm

BB-Thread-ID: thr_nq42ntdw95

BB-Thread-ID: thr_k4ic49de34

AGENT GENERATED

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

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 ✅ Completed 2026-10-14T03:18:34.919013Z 52412d2 PR opened
ℹ️ 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.

@brsbl
brsbl added this pull request to stack #5474 October 14, 2026 03:16

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 52412d26ae

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +300 to +302
const initiator = args.payload.senderThreadId
? "agent"
: args.startedOnBehalfOf?.initiator;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Classify self-senders after normalization

When a send supplies senderThreadId equal to the target thread ID, resolveMessageSenderThreadId intentionally normalizes it to null, so the persisted request is user-initiated. This pre-resolution check instead labels the telemetry origin as agent and disables user_message_sent, producing incorrect message and turn analytics. createQueuedMessageForThread repeats the same raw-field check, so explicit queued messages have the same problem; derive telemetry authorship from the normalized sender in both paths.

Useful? React with 👍 / 👎.

@brsbl
brsbl removed this pull request from stack #5474 October 14, 2026 04:57
@brsbl
brsbl added this pull request to stack #5478 October 14, 2026 04:58
@brsbl
brsbl force-pushed the bb/work-request-links-thr_swe8w7rxcm branch from a96ef8f to 70f6119 Compare October 21, 2026 04:38
@brsbl
brsbl removed this pull request from stack #5478 October 21, 2026 04:40
@brsbl
brsbl added this pull request to stack #5984 October 21, 2026 04:40
@brsbl
brsbl force-pushed the bb/work-request-links-thr_swe8w7rxcm branch 2 times, most recently from b86ffd5 to dd100f8 Compare October 21, 2026 04:54
@github-actions

Copy link
Copy Markdown
Contributor

This is an automated message. We have closed this pull request because it has been open for more than two weeks.

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