Session match types beyond cwd: parent / subagent lineage from JSONL #63

Open
opened 2026-05-23 20:55:29 +00:00 by coilysiren · 0 comments
Owner

Originally filed by @coilysiren on 2026-05-05T07:26:57Z - https://github.com/coilysiren/repo-recall/issues/48

Context

session_repos.match_type is documented in AGENTS.md as the extension point for additional session-to-repo signals beyond 'cwd'. Right now a Claude Code session that fans out into 3 Explore subagents, a Plan subagent, and a code-reviewer subagent appears as 5 indistinguishable rows on the repo page. The parent / child relationship is already in the JSONL records repo-recall parses; surfacing it on the dashboard is purely additive.

Proposal

Add a 'parent' (or similarly named) match_type plus a parent-session column on session_repos, populated from whatever subagent-spawn metadata Claude Code already writes into the JSONL. Sub-sessions of a session render as a tree under the parent on the repo page.

New views that fall out:

  • GET /sessions/{id} gains a "subagents spawned" section, each with its own duration / token / cost
  • Repo page session list collapses children under parents by default, expandable
  • Search by parent session id partitions

Optional consumer hook

A separate harness (LUCA's orchestrator, see coilysiren/luca section 5.4) needs the same lineage but with a richer "run" identifier that groups sub-sessions across multiple parent invocations. That's a follow-up: an env-stamp convention (LUCA_RUN_ID=<id> etc.) read by the JSONL parser when present, surfacing as a separate 'run' match-type on top of the same column. Strictly additive to this issue's 'parent' work.

Out of scope

  • The run-grouping schema. That's the consumer's concern (LUCA section 10.5 / coilysiren/coilyco-ai#24).
  • Durable lineage history. SQLite stays a cache; lineage is read fresh every scan.
  • Cross-host lineage. Local sessions only.

Why now

Multi-subagent runs are normal Claude Code usage now (Explore, Plan, code-review, Anthropic Skills, etc.). The dashboard's session list undercounts what actually happened in a session because it flattens the tree. The harness use cases that come later (LUCA, similar) sit on top of the same lineage column for free.

_Originally filed by @coilysiren on 2026-05-05T07:26:57Z - [https://github.com/coilysiren/repo-recall/issues/48](https://github.com/coilysiren/repo-recall/issues/48)_ ## Context `session_repos.match_type` is documented in `AGENTS.md` as the extension point for additional session-to-repo signals beyond `'cwd'`. Right now a Claude Code session that fans out into 3 Explore subagents, a Plan subagent, and a code-reviewer subagent appears as 5 indistinguishable rows on the repo page. The parent / child relationship is already in the JSONL records repo-recall parses; surfacing it on the dashboard is purely additive. ## Proposal Add a `'parent'` (or similarly named) `match_type` plus a parent-session column on `session_repos`, populated from whatever subagent-spawn metadata Claude Code already writes into the JSONL. Sub-sessions of a session render as a tree under the parent on the repo page. New views that fall out: - `GET /sessions/{id}` gains a "subagents spawned" section, each with its own duration / token / cost - Repo page session list collapses children under parents by default, expandable - Search by parent session id partitions ## Optional consumer hook A separate harness (LUCA's orchestrator, see coilysiren/luca section 5.4) needs the same lineage but with a richer "run" identifier that groups sub-sessions across multiple parent invocations. That's a follow-up: an env-stamp convention (`LUCA_RUN_ID=<id>` etc.) read by the JSONL parser when present, surfacing as a separate `'run'` match-type on top of the same column. Strictly additive to this issue's `'parent'` work. ## Out of scope - The run-grouping schema. That's the consumer's concern (LUCA section 10.5 / coilysiren/coilyco-ai#24). - Durable lineage history. SQLite stays a cache; lineage is read fresh every scan. - Cross-host lineage. Local sessions only. ## Why now Multi-subagent runs are normal Claude Code usage now (Explore, Plan, code-review, Anthropic Skills, etc.). The dashboard's session list undercounts what actually happened in a session because it flattens the tree. The harness use cases that come later (LUCA, similar) sit on top of the same lineage column for free.
coilysiren added
P4
and removed
P3
labels 2026-05-31 07:01:10 +00:00
Sign in to join this conversation.
No labels
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/repo-recall#63
No description provided.