Skip to content

hub: a run's first reply becomes a chat bubble (CL-9907) - #1104

Merged
TheGreatAxios merged 6 commits into
mainfrom
cl-9907-first-reply-bubble
Oct 5, 2026
Merged

TheGreatAxios merged 6 commits into
mainfrom
cl-9907-first-reply-bubble

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Problem: a worker's first reply never became a chat bubble. The run's event collector was only created on its first outbound mail (after inference.start), so the reply's parts were dropped; and mailbox-persist checked a stale pre-ensure sessionId, so session_mail was never written for that mail.

Fix: wrap the hub's event collector registry with withLazyRunCollector (collector is created via ensureRunSession on a run's first event, per-address ordering preserved), and re-resolve the sender after ensureRunSession in mailbox-persist.

Reproduced: new DB suite e2e/workflows/first-reply-session.test.ts failed on origin/main code (no collector created / upstream persistMail not called) and passes now.

Gates: typecheck, lint, fmt:check, e2e suite (29 pass) with local Postgres. bun run test since origin/main reported failures only for packages with no test files.

@linear-code

linear-code Bot commented Oct 4, 2026

Copy link
Copy Markdown

CL-9907

@TheGreatAxios
TheGreatAxios merged commit afeee49 into main Oct 5, 2026
3 checks passed
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