Skip to content

fix(live): repo-root project labels, pending-tool liveness, subagent tailing - #102

Merged
pacphi merged 1 commit into
mainfrom
fix/live-dashboard-liveness-labels
Jul 31, 2026
Merged

fix(live): repo-root project labels, pending-tool liveness, subagent tailing#102
pacphi merged 1 commit into
mainfrom
fix/live-dashboard-liveness-labels

Conversation

@pacphi

@pacphi pacphi commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Summary

Three live-dashboard evidence gaps made genuinely working sessions read as idle or land under phantom projects (observed on the Live tab: "No active sessions" during a 14-minute file write, and an active tub-vault session filed under a phantom scripts project):

  • Repo-root project labelsresolveProjectLabel walks up from the record cwd to the nearest .git marker, so a session running from a repository subdirectory (e.g. tub-vault/scripts) files under its repository instead of a phantom project named after the subdirectory. Linked-worktree pointers keep working (now also from worktree subdirectories); retained paths that no longer exist keep the basename fallback; only a single basename is ever exposed.
  • Pending-tool livenesssweepLiveProjection holds a session active while it has a started-but-unfinished resource node (tool/mcp/skill/plugin), bounded by a new pendingExpiryMs (default 30m). Transcripts only append when a tool call finishes, so long executions previously expired the session at 5m — exactly when it looked busiest.
  • Subagent transcript tailing — Claude store discovery depth 2 → 3 reaches <project>/<session>/subagents/agent-*.jsonl; those records carry the parent sessionId + agentId, so worker activity groups under the parent session and keeps it observable during delegation.

Host coverage: the label and sweep fixes live in the shared projection/service layer. Claude and Codex adapters both emit tool.started/tool.completed and resolve cwd through the same path; structured ruflo/aqe events (the OpenCode path) flow through the same reducer and sweep.

Test plan

  • 4 new tests (written first, watched fail): repo-subdirectory + worktree-subdirectory label resolution, pending-window hold + close, post-completion demotion guard, nested subagent discovery grouping under the parent session with privacy assertions.
  • 66/66 live tests pass; full pnpm test and pnpm run check green.
  • Verified against the real local stores: probe showed tub-vault · live=1, phantom scripts project gone, 128 Claude files tailed (subagent transcripts included), zero adapter errors.

🤖 Generated with Claude Code

…tailing

Three live-dashboard evidence gaps made genuinely working sessions read as
idle or land under phantom projects:

- resolveProjectLabel now walks up from the record cwd to the nearest .git
  marker, so a session running from a repository subdirectory (for example
  tub-vault/scripts) files under its repository instead of a phantom
  project named after the subdirectory. Linked-worktree pointers keep
  working, now also from worktree subdirectories, and retained paths that
  no longer exist keep the basename fallback. Only one basename is ever
  exposed.

- sweepLiveProjection holds a session active while it has a
  started-but-unfinished resource node (tool/mcp/skill/plugin), bounded by
  a new pendingExpiryMs (default 30m). Transcripts only append when a tool
  call finishes, so long executions previously expired the session at 5m
  right when it looked busiest. Host-agnostic: Claude and Codex adapters
  both emit tool.started/tool.completed, and structured ruflo/aqe events
  (the OpenCode path) flow through the same reducer and sweep.

- Claude store discovery depth 2 -> 3 reaches
  <project>/<session>/subagents/agent-*.jsonl. Those records carry the
  parent sessionId plus agentId, so worker activity groups under the
  parent session and keeps it observable while the main transcript idles
  during delegation.
@pacphi
pacphi merged commit daa1ce3 into main Jul 31, 2026
11 checks passed
@pacphi
pacphi deleted the fix/live-dashboard-liveness-labels branch July 31, 2026 06:36
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