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

Closed
opened 2026-05-23 20:55:29 +00:00 by coilysiren · 1 comment
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.
Author
Owner

Backlog burndown 2026-06-17: closing low-priority (P3/P4) to bring the open count to a manageable level. Nothing lost — reopen if this resurfaces. Batch tag: burndown-2026-06.

Backlog burndown 2026-06-17: closing low-priority (P3/P4) to bring the open count to a manageable level. Nothing lost — reopen if this resurfaces. Batch tag: `burndown-2026-06`.
coilysiren 2026-06-17 08:24:25 +00:00
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
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.