Skip to content

Include thread roots in agent activity events - #8029

Merged
salman1993 merged 2 commits into
mainfrom
codex/thread-context-telemetry
Oct 1, 2026
Merged

salman1993 merged 2 commits into
mainfrom
codex/thread-context-telemetry

Conversation

@salman1993

@salman1993 salman1993 commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

With thread conversation context, one agent can work in several threads in the same channel. Observer turn-start and liveness events currently identify only the channel, so clients cannot count distinct active threads reliably.

Add payload.threadRootEventId to turn_started and turn_liveness from the canonical session scope. Conversation-scoped turns, including DMs, and heartbeats omit it. A short code comment explains why thread conversation context requires the root.

This PR contains only the shared producer change. Desktop UI changes will follow in block/buzz-app; telemetry publishing remains separate.

Related issue

Producer-only follow-up to the closed #7901. No separate issue found for the thread-count behavior.

Testing

The production-path regression checks turn-start and liveness payloads for thread and conversation scopes. A fixture gate holds channel lookup until a liveness frame arrives. Removing the liveness root argument at run_prompt_task failed its payload assertion; restoring the wiring passed. Existing controlled-clock tests still cover session resolution and liveness shutdown.

just ci passed on commit 00445906f. Independent agent review found no blockers. Live-relay and human acceptance remain pending.

Generated with Codex

Signed-off-by: Codex <codex@openai.com>
@salman1993
salman1993 marked this pull request as ready for review October 1, 2026 20:56
@salman1993
salman1993 requested a review from a team as a code owner October 1, 2026 20:57
@salman1993
salman1993 deployed to codex-review October 1, 2026 20:57 — with GitHub Actions Active

@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: 115575cda7

ℹ️ 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 thread crates/buzz-acp/src/pool.rs Outdated
Some(observer.clone()),
Some(0),
context,
Some("a".repeat(64)),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Drive the liveness assertion through run_prompt_task

This test passes the root directly to the private liveness helper, so removing or breaking the production wiring at run_prompt_task would leave every new test green: the production-path test asserts only turn_started, while this helper test would continue emitting the manually supplied root. In that regression, clients that miss the ephemeral start frame could not distinguish or resurrect concurrent thread turns from liveness frames. Exercise a nonzero liveness interval through run_prompt_task and assert the resulting frame instead.

AGENTS.md reference: AGENTS.md:L234-L238

Useful? React with 👍 / 👎.

@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 ✅ Completed 2026-10-01T20:59:50.099543Z 115575c 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.

@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Oct 1, 2026
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

🔐 Codex Security Review

Note: This is an automated, security-focused review generated by Codex.
Use it as a supplement to human review; false positives are possible.

Scope

  • Exact PR diff: d1b7da45a232316118d33793c15cbc45e4a86976...00445906f160687f19dcd21392ae0845e66316e8
  • Model: gpt-5.6-sol

💡 Click "edited" above to see earlier reviews for this PR.


Review Summary

Overall Risk: NONE

No concrete security, correctness, or reliability issues found. Thread roots come from the canonical admitted session scope, remain channel-bound, and are carried only in owner-encrypted observer payloads.

Findings

No concrete security, correctness, or reliability findings were identified.

Notes

  • Review used read-only inspection only; repository tests and binaries were not executed as instructed.

Generated by Codex Security Review |
Requested by: @salman1993 |
Workflow run

Signed-off-by: Codex <codex@openai.com>
@salman1993
salman1993 deployed to codex-review October 1, 2026 22:01 — with GitHub Actions Active
@github-actions github-actions Bot added codex-security-review-current The posted Codex security review matches its recorded range. and removed codex-security-review-current The posted Codex security review matches its recorded range. labels Oct 1, 2026

@wpfleger96 wpfleger96 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤖 thanks for this. the root comes from the admitted session scope, so start and liveness can't disagree with how the turn was routed, and putting it in the payload keeps the observer envelope unchanged. the updated test now drives liveness through run_prompt_task by holding the context lookup open, which covers the wiring the earlier helper-only test missed. lgtm

@salman1993
salman1993 merged commit 2e8b8d9 into main Oct 1, 2026
81 checks passed
@salman1993
salman1993 deleted the codex/thread-context-telemetry branch October 1, 2026 22:50
wpfleger96 added a commit that referenced this pull request Oct 1, 2026
* commit '9b083957f^':
  Include thread roots in agent activity events (#8029)
  fix(relay): gate owner-only kinds in shared fan-out access filter (#8006)
  feat(acp): add BUZZ_GIT_IDENTITY switch for agent commit identity (#8024)
  fix(relay): deny channel writes when the channel lookup fails (#8007)

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
ArnaudLafosse92100 added a commit to ArnaudLafosse92100/buzz that referenced this pull request Oct 2, 2026
Brings in 31 upstream commits (639593b), including ACP native-steer
frame-writer fixes (block#7568, block#8022), edited-message routing (block#4741), worker
wrapping at launch (block#7985), BUZZ_GIT_IDENTITY (block#8024), thread roots in agent
activity (block#8029) and built-in prompts without sleep polling (block#7992).

Adaptations:
- buzz-acp acp.rs: keep the fork's turn_output module alongside upstream's
  frame_writer module.
- buzz-acp pool.rs: turn_started carries both the fork's
  triggeringRootEventIds and upstream's threadRootEventId.
- buzz-acp queue.rs: drain_channel keeps upstream's withheld-steer reaction
  collection and still clears the cancelled-root tombstones.
- buzz-acp queue.rs: task_root_event_id is now edit-aware, so the 1h
  cancelled-root tombstone also drops edits routed into a stopped tree.
- buzz-acp base_prompt.md: keep the fork's empty-final-answer rule for bare
  acknowledgements, take upstream's handoff wording and no-sleep guidance.
- buzz-acp tests: new `edit` field on fork-only QueuedEvent/BatchEvent tests.
- desktop channels.rs: keep has_active_non_starter_channel guard inside
  upstream's ensure_starter_channels_inner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Arnoldinh0 <arnaudlafosse92100@gmail.com>

This branch was successfully deployed

1 active deployment
codex-review — 00445906 Deployed Oct 1, 2026 by salman1993 via Run Codex Security Review #6463
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex-security-review-current The posted Codex security review matches its recorded range.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants