Repository navigation
fix(server): lane events go to the thread that launched the lane - #113
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
handleThreadEventsresolves the lane's launching thread frominbox.origin, or elseinbox.requestedBy, using whichever is an agent actor. The thread event is queued with that thread as itsrecipient.deliversends a thread event to itsrecipientand reuses the existing watcher delivery, busy hold and re-judging. Model, usage-limit and link alerts still go tomodelAlertWatcherunchanged."agent"placeholder) or the lane itself, the event reaches no thread. It goes only tomodelAlertWebhookUrl, 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.mdnow describes this.Tests:
DelegatedCompletionDelivery.test.tsdrives 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.tscovers the destination table for every combination of recipient and webhook.Notes
release/native-0.1.10becausemainon this fork does not contain orchestration-v2.scripts/fleet_drift.pyin closura-agent-config, not by this repo. That fix is a separate PR in that repo.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