Skip to content

Fix Pi process notification turns - #1682

Draft
ryanbbrown wants to merge 2 commits into
get-bb:mainfrom
ryanbbrown:bb/fix-unreliable-pi-process-wake-thr_ckq2fgshmf
Draft

Fix Pi process notification turns#1682
ryanbbrown wants to merge 2 commits into
get-bb:mainfrom
ryanbbrown:bb/fix-unreliable-pi-process-wake-thr_ckq2fgshmf

Conversation

@ryanbbrown

@ryanbbrown ryanbbrown commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Depends on #1663. This branch is stacked on that focused agent_end fix; commit 53ae25671 contains the process-notification follow-up.

What changed

  • translate Pi ad-process:notification messages into visible turn input
  • start or reuse one projected turn for attention: "turn"
  • ignore matching message_end envelopes to prevent duplicate output
  • keep idle context and all ignore notifications from opening or changing turns
  • keep process notification item IDs distinct across resumed sessions
  • show a warning when a process-triggered run returns no assistant text
  • avoid classifying an accepted user prompt as a process-triggered turn

Root cause

Pi already invoked the provider for the recorded notification. bb did not recognize the custom SDK message envelopes, so it stored them as provider/unhandled. Pi could then finish with no projected input and no visible assistant output.

Fixes #1681

Validation

  • pnpm exec turbo run test --filter=@bb/agent-runtime --force
    • 29 test files passed
    • 323 tests passed
  • pnpm exec turbo run typecheck --filter=@bb/agent-runtime --force
  • Prettier and git diff --check passed
  • independent review found no blockers after two lifecycle findings were fixed

A live Pi extension run was not repeated after porting this change to the new event translator.

AGENT GENERATED: by GPT-5.6 Sol

@ryanbbrown
ryanbbrown force-pushed the bb/fix-unreliable-pi-process-wake-thr_ckq2fgshmf branch from 930fb12 to 53ae256 Compare August 17, 2026 23:55
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.

Fix Pi process notification wake projection

1 participant