Skip to content

fix(server): lane events go to the thread that launched the lane - #113

Merged
nullStack65 merged 2 commits into
release/native-0.1.10from
t3/clo-916-event-routing
Nov 20, 2026
Merged

nullStack65 merged 2 commits into
release/native-0.1.10from
t3/clo-916-event-routing

Conversation

@nullStack65

@nullStack65 nullStack65 commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Linear: route lane and drift events to the thread that owns them (CLO-916)

Problem

Thread events (lane-ended, stuck, promise-without-wake, needs-person) all went to the single modelAlertWatcher, which by default is Lead's founder-facing Chief of Staff thread. That happened for every lane on every machine, so the founder-facing thread heard about lanes it never launched, and the thread that did launch the lane heard nothing.

Fix

  • handleThreadEvents resolves the lane's launching thread from inbox.origin, or else inbox.requestedBy, using whichever is an agent actor. The thread event is queued with that thread as its recipient.
  • deliver sends a thread event to its recipient and reuses the existing watcher delivery, busy hold and re-judging. Model, usage-limit and link alerts still go to modelAlertWatcher unchanged.
  • Fallback: when the launching thread is archived, deleted, unknown (the "agent" placeholder) or the lane itself, the event reaches no thread. It goes only to modelAlertWebhookUrl, if one is set. It never falls back to the founder-facing watcher, because that misroute is what this issue is about.
  • docs/operations/watcher-thread.md now describes this.

Tests:

  • DelegatedCompletionDelivery.test.ts drives five lanes through the reactor: one launched by CTO, one launched by Lead, one with an archived launcher, one with a missing launcher and one with an unknown launcher. CTO and Lead each get only their own lane's event, and no thread gets the other three. This test fails on the old routing.
  • ModelAlertReactor.test.ts covers the destination table for every combination of recipient and webhook.

Notes

  • Base: this PR targets release/native-0.1.10 because main on this fork does not contain orchestration-v2.
  • Older queued thread events: a thread event that was already queued with no recipient is marked sent and dropped. It is not redelivered to the watcher.
  • Remote launchers: a lane whose launcher is on another environment falls into the fallback.
  • Drift findings: these are sent by scripts/fleet_drift.py in closura-agent-config, not by this repo. That fix is a separate PR in that repo.
  • CI: the previous ARC run lost its runner during the inbox tests. This edit only starts a fresh check on the same head.
  • Local hook: the pre-commit knip step fails on four unused files that are already on the base branch (for example scripts/smoke-cli-archive.ts). Format, lint, the server typecheck and the three test files (153 tests) pass.

Model: claude-opus-5-5
Task: fix
Deploy: fleet

🤖 Generated with Claude Code

Lane-ended, stuck, promise-without-wake and needs-person events went to
the one configured watcher, Lead's founder-facing thread, for every lane
on every machine. They now go to the lane's launching thread, read from
inbox.origin or else inbox.requestedBy. When that thread is archived,
deleted or unknown, only the webhook hears it, never the watcher. Model,
usage-limit and link alerts still go to the watcher.

Model: claude-opus-5-5
Task: fix
Agent: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ing dropped

A lane whose launching thread cannot be resolved, and a webhook left at its
default empty value, queued nothing and was still marked reported, so the
event never reached anyone and never reported again. The signature is now
kept only for what was actually queued, and the drop is logged. A launcher or
webhook that appears later still hears it. Jeff is not legally attached to
anything, and an unresolved launcher still never falls back to a founder-facing
thread.

Model: grok-4.7
Task: fix
Agent: CTO build lane (CLO-916)
Lane: magpie
Harness: t3/claude-code
Model-family: Grok
Model-generation: 4.7
Skills-SHA: unknown (source unavailable)
Co-Authored-By: Claude Code <noreply@anthropic.com>
@nullStack65
nullStack65 merged commit 12cf9bc into release/native-0.1.10 Nov 20, 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.

2 participants