feat(dispatch): roster de-dup for adopted sessions + gated dispatch status#115
Merged
Merged
Conversation
…tatus - AgentSession.adoptedSessionId: a resume-adopt PTY carries the real claude sessionId it continues. hub.dedupeAdoptedSessions() drops the observe-only claude-code twin so the roster doesn't double-count it. (A fresh adopt-at-launch session still shows once per observer — follow-up, since the PTY doesn't know the new uuid.) - GET /api/dispatch/status?id=<id>: status + captured-output tail of one dispatched agent, behind the remote-control gate (raw stdout is sensitive). Verified: typecheck + build clean; 735 tests pass (3 new dedup tests); live-checked /api/dispatch/status (400/404/200 + tail). Co-Authored-By: Claude Opus 4.8 <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.
What
Two control-plane follow-ups from #113/#114.
Roster de-dup — when LISA resume-adopts an idle
claudesession under a PTY (#111), the same real session is also seen by the claude-code observer (its JSONL transcript), so it appeared twice in the roster: once observe-only, once controllable. Now:AgentSession.adoptedSessionId— a resume-adopt PTY carries the real claudesessionIdit continues (claude-only).hub.dedupeAdoptedSessions()(pure) drops the observe-only twin whosesessionIdmatches a controllable session'sadoptedSessionId, keeping the controllable one. Applied inOrchestratorHub.list().lisa agents pty claude "…"session still shows once per observer (the PTY doesn't know the new uuid). Tracked as a follow-up.Gated dispatch status —
GET /api/dispatch/status?id=<id>: status + captured-output tail of one fire-and-forget dispatch (complements the structural/api/dispatch/list). Raw stdout can be sensitive, so it's behind the remote-control gate (loopback always; remote per policy).Verification
npm run typecheck+npm run buildclean; 735 tests / 734 pass / 1 skip / 0 fail (3 newdedupeAdoptedSessionstests)./api/dispatch/status: no id → 400, bad id → 404, good id → 200 with the structural fields + the log tail.🤖 Generated with Claude Code