@dsiloed/silo-link 1.19.14 → 1.19.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +0 -8
  2. package/dist/cable/subscription-manager.d.ts +1 -26
  3. package/dist/cable/subscription-manager.d.ts.map +1 -1
  4. package/dist/cable/subscription-manager.js +13 -72
  5. package/dist/cable/subscription-manager.js.map +1 -1
  6. package/dist/cli/file-log.d.ts +3 -58
  7. package/dist/cli/file-log.d.ts.map +1 -1
  8. package/dist/cli/file-log.js +7 -110
  9. package/dist/cli/file-log.js.map +1 -1
  10. package/dist/core/agent-launcher.d.ts +0 -19
  11. package/dist/core/agent-launcher.d.ts.map +1 -1
  12. package/dist/core/base-tmux-launcher.d.ts +19 -42
  13. package/dist/core/base-tmux-launcher.d.ts.map +1 -1
  14. package/dist/core/base-tmux-launcher.js +73 -163
  15. package/dist/core/base-tmux-launcher.js.map +1 -1
  16. package/dist/core/bridge.d.ts.map +1 -1
  17. package/dist/core/bridge.js +4 -9
  18. package/dist/core/bridge.js.map +1 -1
  19. package/dist/core/claude-launcher.d.ts +2 -7
  20. package/dist/core/claude-launcher.d.ts.map +1 -1
  21. package/dist/core/claude-launcher.js +8 -30
  22. package/dist/core/claude-launcher.js.map +1 -1
  23. package/dist/core/codex-launcher.d.ts +1 -1
  24. package/dist/core/codex-launcher.d.ts.map +1 -1
  25. package/dist/core/codex-launcher.js +3 -7
  26. package/dist/core/codex-launcher.js.map +1 -1
  27. package/dist/core/gemini-launcher.d.ts +1 -1
  28. package/dist/core/gemini-launcher.d.ts.map +1 -1
  29. package/dist/core/gemini-launcher.js +3 -7
  30. package/dist/core/gemini-launcher.js.map +1 -1
  31. package/dist/core/transcript-usage.d.ts +0 -9
  32. package/dist/core/transcript-usage.d.ts.map +1 -1
  33. package/dist/core/transcript-usage.js +0 -19
  34. package/dist/core/transcript-usage.js.map +1 -1
  35. package/dist/types/index.d.ts +0 -1
  36. package/dist/types/index.d.ts.map +1 -1
  37. package/package.json +1 -1
  38. package/dist/core/baseline-verify.d.ts +0 -54
  39. package/dist/core/baseline-verify.d.ts.map +0 -1
  40. package/dist/core/baseline-verify.js +0 -164
  41. package/dist/core/baseline-verify.js.map +0 -1
  42. package/dist/core/openai-launcher.d.ts +0 -33
  43. package/dist/core/openai-launcher.d.ts.map +0 -1
  44. package/dist/core/openai-launcher.js +0 -38
  45. package/dist/core/openai-launcher.js.map +0 -1
@@ -3,14 +3,13 @@ import type { SessionManager } from './session-manager.js';
3
3
  import type { MessageQueue } from './message-queue.js';
4
4
  import type { DSiloedClient } from '../api/dsiloed-client.js';
5
5
  import type { WorkspaceManager } from './workspace-manager.js';
6
- import type { AgentLauncher, LaunchConfig, AgentProcess, WedgeVerdict } from './agent-launcher.js';
6
+ import type { AgentLauncher, LaunchConfig, AgentProcess } from './agent-launcher.js';
7
7
  import type { UsageEntry } from './transcript-usage.js';
8
8
  import type { UsageLedger, UsageReconcileTarget, UsageReconcileOutcome } from './usage-ledger.js';
9
9
  interface TmuxSessionInfo {
10
10
  conversationId: number;
11
11
  startedAt: Date;
12
12
  cwd?: string;
13
- mintedSessionId?: string;
14
13
  }
15
14
  /**
16
15
  * Abstract base class for tmux-based agent launchers.
@@ -63,10 +62,8 @@ export declare abstract class BaseTmuxLauncher implements AgentLauncher {
63
62
  }>;
64
63
  protected static readonly PROMPT_STALL_THRESHOLD_MS: number;
65
64
  protected static readonly PROMPT_STALL_RENOTIFY_MS: number;
66
- protected restoredResumeIds: Map<number, string>;
67
- protected resumeIdOwner: Map<string, number>;
68
- protected mintedResumeIds: Map<number, string>;
69
- protected persistedResumeIds: Set<string>;
65
+ protected lastSessionId: string | null;
66
+ protected lastSessionConversationId: number | null;
70
67
  protected pendingTriggerMessage: string | null;
71
68
  protected pendingWorkspaceConfig: WorkspaceLaunchConfig | null;
72
69
  protected pendingWorkspaceCwd: string | null;
@@ -290,14 +287,6 @@ export declare abstract class BaseTmuxLauncher implements AgentLauncher {
290
287
  */
291
288
  protected takePendingSessionPrompt(): string | null;
292
289
  setLastResumeId(resumeId: string, conversationId?: number): void;
293
- /** The resume id minted at launch for a conversation (Claude), if any. */
294
- getMintedResumeId(conversationId: number): string | undefined;
295
- /**
296
- * Public entry to the capture path — the Bridge calls it right after it
297
- * pre-registers a launched session so a minted id lands on the Session (and
298
- * is persisted once) immediately rather than on the next liveness tick.
299
- */
300
- syncResumeId(conversationId: number): void;
301
290
  /**
302
291
  * The resume id to use when launching for `conversationId`, or null to launch
303
292
  * fresh. Only a pin captured for the SAME conversation may be resumed — a pin
@@ -309,8 +298,8 @@ export declare abstract class BaseTmuxLauncher implements AgentLauncher {
309
298
  /**
310
299
  * Forget a resume target that turned out to be unresumable so the next
311
300
  * relaunch starts FRESH instead of re-crashing on the same `--resume <id>`.
312
- * Clears every store a resume target lives in: the per-conversation restored
313
- * and minted ids, the in-memory SessionInfo (which finishPaneTeardown would otherwise restore),
301
+ * Clears all three stores captureResumeId writes to: the global `lastSessionId`,
302
+ * the in-memory SessionInfo (which finishPaneTeardown would otherwise restore),
314
303
  * and the persisted rails AgentSession metadata (so a daemon restart can't
315
304
  * resurrect it). Best-effort; never throws into the teardown path.
316
305
  */
@@ -431,25 +420,21 @@ export declare abstract class BaseTmuxLauncher implements AgentLauncher {
431
420
  *
432
421
  * Best-effort: returns null on any failure. NEVER throws into the launch path.
433
422
  */
434
- protected detectResumeId(_cwd: string, _notBefore?: Date): string | null;
435
- /**
436
- * Pin the running worker's CLI session id on its Session so the next respawn
437
- * relaunches the SAME session (`--resume`). Two sources, in order:
438
- * 1. the id MINTED at launch (Claude `--session-id`) — authoritative, no
439
- * discovery, never overwritten;
440
- * 2. discovery from the CLI's on-disk transcript (Gemini/Codex, and Claude
441
- * launches that resumed) — accepted only if the transcript was touched
442
- * at/after the pane's startedAt.
443
- * Either way the id is refused when another conversation owns it — a LIVE
444
- * session or any conversation seen earlier this process lifetime
445
- * (`resumeIdOwner`, which survives unregister). Stores on the Session
446
- * (`resumeId`) and persists `cli_resume_id` + legacy `claude_resume_id` to the
447
- * rails AgentSession metadata ONCE per (agent session, id) pair — that
448
- * survives a daemon restart so bridge startup / remote_load_context can
449
- * restore it.
423
+ protected detectResumeId(_cwd: string): string | null;
424
+ /**
425
+ * Capture the running worker's CLI session id and remember it so the next
426
+ * respawn relaunches the SAME session (`--resume`). Stores on three places:
427
+ * 1. `this.lastSessionId` — what buildLaunchPrompt reads to add resume args.
428
+ * 2. the SessionInfo (`resumeId`) — survives in-memory so finishPaneTeardown
429
+ * can restore it just before relaunch (keyed off the SESSION, not a stale
430
+ * global).
431
+ * 3. the rails AgentSession metadata (`cli_resume_id` + legacy
432
+ * `claude_resume_id`) — survives a daemon restart so bridge startup /
433
+ * remote_load_context can restore it.
450
434
  *
451
- * Idempotent; runs on the liveness tick and once right after launch.
452
- * Best-effort — a capture failure leaves prior state intact and never blocks.
435
+ * Idempotent + throttled by the caller (runs on the live-usage tick and once
436
+ * shortly after launch). Best-effort — a capture failure leaves prior state
437
+ * intact and never blocks anything.
453
438
  */
454
439
  protected captureResumeId(conversationId: number): void;
455
440
  protected captureUsageFromTranscript(conversationId: number, final?: boolean): boolean;
@@ -578,14 +563,6 @@ export declare abstract class BaseTmuxLauncher implements AgentLauncher {
578
563
  * of purely local work is never recycled.
579
564
  */
580
565
  protected reapWedgedSessions(sessions: Session[], now: number): void;
581
- /**
582
- * Wedge verdict for one conversation, from the SAME primitives
583
- * reapWedgedSessions uses: pane present + capturable, not actively thinking,
584
- * and substantive content frozen for at least FROZEN_THRESHOLD_MS. Used by the
585
- * stale-on-inbound recycler (2026-08-23: it recycled on MCP silence alone and
586
- * killed live panes mid-work — conv 3337 six times in one evening).
587
- */
588
- isSessionWedged(conversationId: number): WedgeVerdict;
589
566
  protected isActivelyThinking(tmuxSession: string): boolean;
590
567
  /**
591
568
  * Capture the recent pane tail for progress detection. Isolated as a seam so
@@ -1 +1 @@
1
- {"version":3,"file":"base-tmux-launcher.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S,CAAC,0BAA0B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAWxE;;;;;;OAMG;IACH,SAAS,CAAC,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAcnD;;;;;OAKG;IACH,SAAS,CAAC,wBAAwB,IAAI,MAAM,EAAE;IAS9C,SAAS,CAAC,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;CAYnE;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAEpF"}
@@ -103,26 +103,12 @@ export class BaseTmuxLauncher {
103
103
  static PROMPT_STALL_THRESHOLD_MS = 3 * 60 * 1000;
104
104
  // Re-notify cadence while the SAME stall persists unanswered.
105
105
  static PROMPT_STALL_RENOTIFY_MS = 30 * 60 * 1000;
106
- // Resume ids restored PER CONVERSATION for its next launch (from a dying
107
- // session, Rails metadata at boot, or the process-dead sweep). Key 0 holds a
108
- // pin of unknown provenance, usable only by a launch with no target
109
- // conversation. This replaces the launcher-global `lastSessionId` slot: one
110
- // slot shared by every conversation let a capture for conv A become conv B's
111
- // `--resume` target (three transcripts pinned to conv 3331 in turn, then
112
- // handed to 3337 and 3369 — 2026-08-24). A pinned resume id replays ONE
113
- // conversation's CLI context and must never cross conversations.
114
- restoredResumeIds = new Map();
115
- // resumeId → owning conversation. Survives unregister: a transcript that once
116
- // belonged to conv A is never attributed to conv B later in this process
117
- // lifetime, even after A's session is gone (the old guard only looked at
118
- // LIVE sessions, so 3331's transcript was captured for 3337 the moment 3331
119
- // stopped).
120
- resumeIdOwner = new Map();
121
- // Resume ids minted at launch (Claude `--session-id`), per conversation.
122
- mintedResumeIds = new Map();
123
- // `${agentSessionId}:${resumeId}` pairs already persisted to Rails — the
124
- // metadata PUT happens ONCE per pair, not on every liveness tick.
125
- persistedResumeIds = new Set();
106
+ lastSessionId = null;
107
+ // Which conversation lastSessionId belongs to. A pinned resume id replays ONE
108
+ // conversation's CLI context; multi-conversation daemons (personal) must never
109
+ // resume it for a different conversation or the worker re-registers under the
110
+ // old conversation (the nightly-audit-review attribution leak).
111
+ lastSessionConversationId = null;
126
112
  pendingTriggerMessage = null;
127
113
  pendingWorkspaceConfig = null;
128
114
  pendingWorkspaceCwd = null;
@@ -479,10 +465,6 @@ export class BaseTmuxLauncher {
479
465
  // isAutoRespawnEnabled() at their own call sites.
480
466
  if (!this.enabled)
481
467
  return;
482
- // Idempotent: a second call must not overwrite idleCheckTimer and orphan
483
- // the first interval (the Codex launcher used to be started twice).
484
- if (this.idleCheckTimer)
485
- return;
486
468
  // Reap tmux sessions left over from a prior daemon run before the
487
469
  // monitor starts. The new daemon's tmuxSessions map is empty by
488
470
  // definition, and the spawned CCs in those panes were bound to the
@@ -711,23 +693,10 @@ export class BaseTmuxLauncher {
711
693
  return prompt;
712
694
  }
713
695
  setLastResumeId(resumeId, conversationId) {
714
- this.restoredResumeIds.set(conversationId ?? 0, resumeId);
715
- if (conversationId)
716
- this.resumeIdOwner.set(resumeId, conversationId);
696
+ this.lastSessionId = resumeId;
697
+ this.lastSessionConversationId = conversationId ?? null;
717
698
  console.log(`${this.getLogTag()} Restored resume ID: ${resumeId} (conv=${conversationId ?? 'unknown'})`);
718
699
  }
719
- /** The resume id minted at launch for a conversation (Claude), if any. */
720
- getMintedResumeId(conversationId) {
721
- return this.mintedResumeIds.get(conversationId);
722
- }
723
- /**
724
- * Public entry to the capture path — the Bridge calls it right after it
725
- * pre-registers a launched session so a minted id lands on the Session (and
726
- * is persisted once) immediately rather than on the next liveness tick.
727
- */
728
- syncResumeId(conversationId) {
729
- this.captureResumeId(conversationId);
730
- }
731
700
  /**
732
701
  * The resume id to use when launching for `conversationId`, or null to launch
733
702
  * fresh. Only a pin captured for the SAME conversation may be resumed — a pin
@@ -738,35 +707,32 @@ export class BaseTmuxLauncher {
738
707
  resumeTargetFor(conversationId) {
739
708
  // Per-conversation pin is authoritative: each Session stores the resume id
740
709
  // captured for ITS OWN transcript, so two conversations sharing a cwd never
741
- // resume each other's CLI session. The per-conversation restored id is the
742
- // fallback (dying session / Rails metadata at boot). Nothing else — a pin
743
- // from another conversation or of unknown provenance launches fresh.
710
+ // resume each other's CLI session. The global lastSessionId is only a
711
+ // fallback, and only when it was captured for THIS same conversation.
744
712
  if (conversationId) {
745
713
  const pinned = this.sessionManager.getByConversationId(conversationId)?.resumeId;
746
714
  if (pinned)
747
715
  return pinned;
748
- const restored = this.restoredResumeIds.get(conversationId);
749
- if (restored)
750
- return restored;
751
- const orphanPin = this.restoredResumeIds.get(0);
752
- if (orphanPin) {
753
- console.warn(`${this.getLogTag()} Resume id ${orphanPin} has no recorded conversation — launching conv=${conversationId} fresh instead of resuming it.`);
716
+ if (this.lastSessionConversationId !== conversationId) {
717
+ if (this.lastSessionId) {
718
+ console.warn(`${this.getLogTag()} Resume id ${this.lastSessionId} belongs to conv=${this.lastSessionConversationId ?? 'unknown'} — launching conv=${conversationId} fresh instead of resuming it.`);
719
+ }
720
+ return null;
754
721
  }
755
- return null;
756
722
  }
757
- return this.restoredResumeIds.get(0) ?? null;
723
+ return this.lastSessionId;
758
724
  }
759
725
  /**
760
726
  * Forget a resume target that turned out to be unresumable so the next
761
727
  * relaunch starts FRESH instead of re-crashing on the same `--resume <id>`.
762
- * Clears every store a resume target lives in: the per-conversation restored
763
- * and minted ids, the in-memory SessionInfo (which finishPaneTeardown would otherwise restore),
728
+ * Clears all three stores captureResumeId writes to: the global `lastSessionId`,
729
+ * the in-memory SessionInfo (which finishPaneTeardown would otherwise restore),
764
730
  * and the persisted rails AgentSession metadata (so a daemon restart can't
765
731
  * resurrect it). Best-effort; never throws into the teardown path.
766
732
  */
767
733
  clearResumeId(conversationId) {
768
- this.restoredResumeIds.delete(conversationId || 0);
769
- this.mintedResumeIds.delete(conversationId);
734
+ this.lastSessionId = null;
735
+ this.lastSessionConversationId = null;
770
736
  const session = conversationId
771
737
  ? this.sessionManager.getByConversationId(conversationId)
772
738
  : this.sessionManager.getAll()[0];
@@ -1293,16 +1259,10 @@ export class BaseTmuxLauncher {
1293
1259
  return false;
1294
1260
  }
1295
1261
  console.log(`${this.getLogTag()} tmux session "${tmuxSession}" created`);
1296
- const mintedSessionId = conversationId ? this.mintedResumeIds.get(conversationId) : undefined;
1297
- this.tmuxSessions.set(tmuxSession, { conversationId: conversationId || 0, startedAt: new Date(), cwd, mintedSessionId });
1262
+ this.tmuxSessions.set(tmuxSession, { conversationId: conversationId || 0, startedAt: new Date(), cwd });
1298
1263
  if (workspaceSessionId) {
1299
1264
  this.tmuxSessionWorkspaces.set(tmuxSession, workspaceSessionId);
1300
1265
  }
1301
- // A minted id needs no discovery — pin it on an already-registered session
1302
- // (relaunch) right away. A fresh launch's session is pre-registered by the
1303
- // Bridge afterwards, which calls syncResumeId.
1304
- if (mintedSessionId && conversationId)
1305
- this.captureResumeId(conversationId);
1306
1266
  // Wait for agent to be ready, then send the prompt
1307
1267
  const sessionToPrompt = tmuxSession;
1308
1268
  const promptToSend = this.formatPrompt(prompt);
@@ -1479,7 +1439,7 @@ export class BaseTmuxLauncher {
1479
1439
  // forget that id so finishPaneTeardown relaunches FRESH instead of
1480
1440
  // re-issuing the same doomed `--resume`/`resume` and looping forever.
1481
1441
  // Applies to every CLI via the per-launcher isResumeFailure() override.
1482
- const hadResumeTarget = this.restoredResumeIds.has(info.conversationId)
1442
+ const hadResumeTarget = this.lastSessionId != null
1483
1443
  || this.sessionManager.getByConversationId(info.conversationId)?.resumeId != null;
1484
1444
  if (hadResumeTarget && this.isResumeFailure(paneContent)) {
1485
1445
  console.warn(`${this.getLogTag()} Pane died on an unresumable session for conv=${info.conversationId} — clearing resume id and relaunching fresh.`);
@@ -1509,12 +1469,12 @@ export class BaseTmuxLauncher {
1509
1469
  const stillRegistered = this.sessionManager.getByConversationId(conversationId);
1510
1470
  if (!stillRegistered)
1511
1471
  return;
1512
- // RESTORE resume id from the dying SESSION's stored value BEFORE we
1513
- // unregister it — this is what lets the auto-respawn relaunch the SAME CLI
1514
- // session (`--resume <id>`) and continue an in-progress task instead of
1515
- // starting fresh. Best-effort: if the worker never captured an id (capture
1516
- // failed / CLI has no resume), nothing is restored and the relaunch falls
1517
- // back to a fresh session — never blocked.
1472
+ // RESTORE resume id from the dying SESSION's stored value (not a stale
1473
+ // global) BEFORE we unregister it — this is what lets the auto-respawn relaunch
1474
+ // the SAME CLI session (`--resume <id>`) and continue an in-progress task
1475
+ // instead of starting fresh. Best-effort: if the worker never captured an id
1476
+ // (capture failed / CLI has no resume), lastSessionId stays null and the
1477
+ // relaunch falls back to a fresh session — current behavior, never blocked.
1518
1478
  const resumeId = stillRegistered.resumeId || stillRegistered.claudeResumeId;
1519
1479
  if (resumeId) {
1520
1480
  this.setLastResumeId(resumeId, conversationId);
@@ -1595,27 +1555,23 @@ export class BaseTmuxLauncher {
1595
1555
  *
1596
1556
  * Best-effort: returns null on any failure. NEVER throws into the launch path.
1597
1557
  */
1598
- detectResumeId(_cwd, _notBefore) {
1558
+ detectResumeId(_cwd) {
1599
1559
  return null;
1600
1560
  }
1601
1561
  /**
1602
- * Pin the running worker's CLI session id on its Session so the next respawn
1603
- * relaunches the SAME session (`--resume`). Two sources, in order:
1604
- * 1. the id MINTED at launch (Claude `--session-id`) — authoritative, no
1605
- * discovery, never overwritten;
1606
- * 2. discovery from the CLI's on-disk transcript (Gemini/Codex, and Claude
1607
- * launches that resumed) — accepted only if the transcript was touched
1608
- * at/after the pane's startedAt.
1609
- * Either way the id is refused when another conversation owns it — a LIVE
1610
- * session or any conversation seen earlier this process lifetime
1611
- * (`resumeIdOwner`, which survives unregister). Stores on the Session
1612
- * (`resumeId`) and persists `cli_resume_id` + legacy `claude_resume_id` to the
1613
- * rails AgentSession metadata ONCE per (agent session, id) pair — that
1614
- * survives a daemon restart so bridge startup / remote_load_context can
1615
- * restore it.
1562
+ * Capture the running worker's CLI session id and remember it so the next
1563
+ * respawn relaunches the SAME session (`--resume`). Stores on three places:
1564
+ * 1. `this.lastSessionId` — what buildLaunchPrompt reads to add resume args.
1565
+ * 2. the SessionInfo (`resumeId`) — survives in-memory so finishPaneTeardown
1566
+ * can restore it just before relaunch (keyed off the SESSION, not a stale
1567
+ * global).
1568
+ * 3. the rails AgentSession metadata (`cli_resume_id` + legacy
1569
+ * `claude_resume_id`) — survives a daemon restart so bridge startup /
1570
+ * remote_load_context can restore it.
1616
1571
  *
1617
- * Idempotent; runs on the liveness tick and once right after launch.
1618
- * Best-effort — a capture failure leaves prior state intact and never blocks.
1572
+ * Idempotent + throttled by the caller (runs on the live-usage tick and once
1573
+ * shortly after launch). Best-effort — a capture failure leaves prior state
1574
+ * intact and never blocks anything.
1619
1575
  */
1620
1576
  captureResumeId(conversationId) {
1621
1577
  const session = conversationId
@@ -1624,63 +1580,44 @@ export class BaseTmuxLauncher {
1624
1580
  if (!session)
1625
1581
  return;
1626
1582
  // Locate by the ACTUAL launch cwd (same resolution extractTranscriptUsage uses).
1627
- let info;
1628
- for (const candidate of this.tmuxSessions.values()) {
1629
- if (candidate.conversationId === conversationId) {
1630
- info = candidate;
1583
+ let cwd;
1584
+ for (const info of this.tmuxSessions.values()) {
1585
+ if (info.conversationId === conversationId) {
1586
+ cwd = info.cwd;
1631
1587
  break;
1632
1588
  }
1633
1589
  }
1634
- const cwd = info?.cwd || this.getWorkingDirectory();
1635
- const minted = info?.mintedSessionId ?? this.mintedResumeIds.get(conversationId);
1590
+ cwd ||= this.getWorkingDirectory();
1636
1591
  let resumeId = null;
1637
- let source;
1638
- if (minted) {
1639
- resumeId = minted;
1640
- source = 'minted';
1592
+ try {
1593
+ resumeId = this.detectResumeId(cwd);
1641
1594
  }
1642
- else {
1643
- try {
1644
- resumeId = this.detectResumeId(cwd, info?.startedAt);
1645
- }
1646
- catch (err) {
1647
- console.warn(`${this.getLogTag()} detectResumeId failed for conv=${conversationId}: ${err}`);
1648
- return;
1649
- }
1650
- source = 'discovered';
1595
+ catch (err) {
1596
+ console.warn(`${this.getLogTag()} detectResumeId failed for conv=${conversationId}: ${err}`);
1597
+ return;
1651
1598
  }
1652
1599
  if (!resumeId)
1653
1600
  return;
1654
- // Ownership guard. detectResumeId is cwd-scoped ("most recent transcript in
1655
- // the launch cwd"), so when two conversations share a cwd it can return the
1656
- // OTHER conversation's transcript. Never pin an id that a different
1657
- // conversation owns — live (2026-07-18: conv 2170 stole conv 2158's id and
1658
- // the 2170 pane ended up polling 2158) or previously seen (2026-08-24: once
1659
- // 3331 stopped, its transcript was captured for 3337, then 3337's for 3369).
1660
- const priorOwner = this.resumeIdOwner.get(resumeId);
1661
- if (priorOwner !== undefined && priorOwner !== conversationId) {
1662
- console.warn(`${this.getLogTag()} Resume id ${resumeId} is owned by conv=${priorOwner} — NOT capturing it for conv=${conversationId} (${source}). Leaving fresh.`);
1601
+ // Cross-conversation guard: detectResumeId is cwd-scoped ("most recent
1602
+ // transcript in the launch cwd"), so when two conversations share a cwd it
1603
+ // can return the OTHER conversation's transcript. Never pin a transcript id
1604
+ // that a different live conversation's session already owns — that would
1605
+ // make this conversation resume the other's CLI session (observed 2026-07-18:
1606
+ // conv 2170 stole conv 2158's id, both in the demo-kit cwd, so the 2170
1607
+ // pane ended up polling 2158). Leave this conversation fresh instead.
1608
+ const otherOwner = this.sessionManager.getAll().find((s) => s.resumeId === resumeId && s.conversationId !== conversationId);
1609
+ if (otherOwner) {
1610
+ console.warn(`${this.getLogTag()} Resume id ${resumeId} already owned by conv=${otherOwner.conversationId} — NOT capturing it for conv=${conversationId} (shared cwd). Leaving fresh.`);
1663
1611
  return;
1664
1612
  }
1665
- const otherLive = this.sessionManager.getAll().find((s) => s.resumeId === resumeId && s.conversationId !== conversationId);
1666
- if (otherLive) {
1667
- console.warn(`${this.getLogTag()} Resume id ${resumeId} already owned by live conv=${otherLive.conversationId} — NOT capturing it for conv=${conversationId} (shared cwd). Leaving fresh.`);
1613
+ // No change — already captured this id.
1614
+ if (this.lastSessionId === resumeId && session.resumeId === resumeId)
1668
1615
  return;
1669
- }
1670
- this.resumeIdOwner.set(resumeId, conversationId);
1671
- const changed = session.resumeId !== resumeId;
1672
- if (changed) {
1673
- if (session.resumeId) {
1674
- console.log(`${this.getLogTag()} Resume id for conv=${conversationId}: ${session.resumeId} → ${resumeId} (${source})`);
1675
- }
1676
- session.resumeId = resumeId;
1677
- session.claudeResumeId = resumeId; // keep legacy alias in sync
1678
- }
1616
+ this.lastSessionId = resumeId;
1617
+ this.lastSessionConversationId = conversationId || session.conversationId || null;
1618
+ session.resumeId = resumeId;
1619
+ session.claudeResumeId = resumeId; // keep legacy alias in sync
1679
1620
  if (this.dsiloedClient && session.agentSessionId) {
1680
- const key = `${session.agentSessionId}:${resumeId}`;
1681
- if (this.persistedResumeIds.has(key))
1682
- return;
1683
- this.persistedResumeIds.add(key);
1684
1621
  // MERGE — only the resume keys; a full replace would wipe workspace_* and
1685
1622
  // server-set keys. Persist BOTH a generic key and the legacy claude key the
1686
1623
  // bridge startup / remote_load_context already read.
@@ -1688,14 +1625,11 @@ export class BaseTmuxLauncher {
1688
1625
  cli_resume_id: resumeId,
1689
1626
  claude_resume_id: resumeId,
1690
1627
  }).then(() => {
1691
- console.log(`${this.getLogTag()} Captured resume id ${resumeId} for conv=${conversationId} (agent session ${session.agentSessionId}, ${source})`);
1692
- }).catch(err => {
1693
- this.persistedResumeIds.delete(key); // retry on the next tick
1694
- console.error(`${this.getLogTag()} Failed to persist resume id:`, err);
1695
- });
1628
+ console.log(`${this.getLogTag()} Captured resume id ${resumeId} for conv=${conversationId} (agent session ${session.agentSessionId})`);
1629
+ }).catch(err => console.error(`${this.getLogTag()} Failed to persist resume id:`, err));
1696
1630
  }
1697
- else if (changed) {
1698
- console.log(`${this.getLogTag()} Captured resume id ${resumeId} for conv=${conversationId} (in-memory only, ${source})`);
1631
+ else {
1632
+ console.log(`${this.getLogTag()} Captured resume id ${resumeId} for conv=${conversationId} (in-memory only)`);
1699
1633
  }
1700
1634
  }
1701
1635
  // Returns true if usage was found and a report was initiated (used by the
@@ -1729,7 +1663,7 @@ export class BaseTmuxLauncher {
1729
1663
  }
1730
1664
  }
1731
1665
  cwd ||= ledgerEntry?.cwd || this.getWorkingDirectory();
1732
- const cliSessionId = session?.resumeId ?? ledgerEntry?.cliSessionId ?? this.restoredResumeIds.get(conversationId) ?? null;
1666
+ const cliSessionId = this.lastSessionId ?? session?.resumeId ?? ledgerEntry?.cliSessionId ?? null;
1733
1667
  let extracted;
1734
1668
  try {
1735
1669
  extracted = this.extractTranscriptUsage(cwd, cliSessionId);
@@ -1851,7 +1785,7 @@ export class BaseTmuxLauncher {
1851
1785
  agentSessionId: session.agentSessionId,
1852
1786
  cliType: this.getCliType(),
1853
1787
  cwd: cwd || this.getWorkingDirectory(),
1854
- cliSessionId: session.resumeId || undefined,
1788
+ cliSessionId: session.resumeId || this.lastSessionId || undefined,
1855
1789
  tmuxSession,
1856
1790
  });
1857
1791
  }
@@ -2181,30 +2115,6 @@ export class BaseTmuxLauncher {
2181
2115
  this.killByConversation(s.conversationId, `wedged-session:${idleMin}min`);
2182
2116
  }
2183
2117
  }
2184
- /**
2185
- * Wedge verdict for one conversation, from the SAME primitives
2186
- * reapWedgedSessions uses: pane present + capturable, not actively thinking,
2187
- * and substantive content frozen for at least FROZEN_THRESHOLD_MS. Used by the
2188
- * stale-on-inbound recycler (2026-08-23: it recycled on MCP silence alone and
2189
- * killed live panes mid-work — conv 3337 six times in one evening).
2190
- */
2191
- isSessionWedged(conversationId) {
2192
- const paneName = this.tmuxNameForConversation(conversationId);
2193
- if (!paneName)
2194
- return { wedged: false, reason: 'no-pane', paneName: null };
2195
- if (this.capturePaneTailForProgress(paneName) === null) {
2196
- return { wedged: false, reason: 'pane-gone', paneName };
2197
- }
2198
- if (this.isActivelyThinking(paneName))
2199
- return { wedged: false, reason: 'pane-active', paneName };
2200
- const prog = this.paneProgress.get(paneName);
2201
- const frozenMs = prog ? Date.now() - prog.lastChangeAt : 0;
2202
- const frozenMin = Math.round(frozenMs / 60000);
2203
- if (frozenMs < BaseTmuxLauncher.FROZEN_THRESHOLD_MS) {
2204
- return { wedged: false, reason: `frozen-${frozenMin}min<threshold`, paneName };
2205
- }
2206
- return { wedged: true, reason: `frozen-${frozenMin}min`, paneName };
2207
- }
2208
2118
  isActivelyThinking(tmuxSession) {
2209
2119
  const now = Date.now();
2210
2120
  const prev = this.paneProgress.get(tmuxSession);