Skip to content

feat(dispatch): roster de-dup for adopted sessions + gated dispatch status#115

Merged
oratis merged 1 commit into
mainfrom
feat/roster-dedup-and-dispatch-status
Jun 19, 2026
Merged

feat(dispatch): roster de-dup for adopted sessions + gated dispatch status#115
oratis merged 1 commit into
mainfrom
feat/roster-dedup-and-dispatch-status

Conversation

@oratis

@oratis oratis commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Stacked on #114#113. Retarget to main once those merge.

What

Two control-plane follow-ups from #113/#114.

Roster de-dup — when LISA resume-adopts an idle claude session 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 claude sessionId it continues (claude-only).
  • hub.dedupeAdoptedSessions() (pure) drops the observe-only twin whose sessionId matches a controllable session's adoptedSessionId, keeping the controllable one. Applied in OrchestratorHub.list().
  • Known gap: a fresh 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 statusGET /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 build clean; 735 tests / 734 pass / 1 skip / 0 fail (3 new dedupeAdoptedSessions tests).
  • Live-checked /api/dispatch/status: no id → 400, bad id → 404, good id → 200 with the structural fields + the log tail.

🤖 Generated with Claude Code

…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>
@oratis oratis changed the base branch from feat/remote-control-gating to main June 19, 2026 05:08
@oratis oratis merged commit 2f8457a into main Jun 19, 2026
1 check passed
@oratis oratis deleted the feat/roster-dedup-and-dispatch-status branch June 19, 2026 05:09
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