fix(live): repo-root project labels, pending-tool liveness, subagent tailing - #102
Merged
Conversation
…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.
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.
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
scriptsproject):resolveProjectLabelwalks up from the recordcwdto the nearest.gitmarker, 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.sweepLiveProjectionholds a sessionactivewhile it has a started-but-unfinished resource node (tool/mcp/skill/plugin), bounded by a newpendingExpiryMs(default 30m). Transcripts only append when a tool call finishes, so long executions previously expired the session at 5m — exactly when it looked busiest.<project>/<session>/subagents/agent-*.jsonl; those records carry the parentsessionId+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.completedand resolvecwdthrough the same path; structured ruflo/aqe events (the OpenCode path) flow through the same reducer and sweep.Test plan
pnpm testandpnpm run checkgreen.tub-vault · live=1, phantomscriptsproject gone, 128 Claude files tailed (subagent transcripts included), zero adapter errors.🤖 Generated with Claude Code