Repository navigation
Description
Problem
Current ingestion is timer-driven, so sessions are generally queryable
only after the archive catches up. That misses a primary use case:
"show me what the agent is doing now" or "search the latest session
state before the next ingest pass".
This is not a separate ontology of "live transcripts" or "partial
transcripts". A session state read from an actively written source file
should mean the same thing as a session state read from the stable
archive. The real distinction is only freshness and provenance:
- stable archive state: the last ingested snapshot
- tailed source state: newer source bytes that the archive has not yet
absorbed
The repository should support tailing ahead-of-archive source state
through the normal query surface without inventing a second semantic
model, a second query language, or a special class of supposedly
non-final conversations.
Strengthened scope
This issue must resolve the architecture decisively and implement one
canonical path for tail/catch-up support.
Required outcomes:
- choose one architecture rather than leaving both "query raw files
directly" and "periodic ingest overlay" in play - preserve normal query semantics; tail mode must behave like ordinary
archive querying, not a bespoke inspection mode with different result
meaning - define explicit freshness/provenance semantics for ahead-of-archive
source state without implying that the conversation model itself has
changed - handle append growth, rewrite/truncation, duplication, disappearance,
and archive catch-up deterministically - land an MVP for the highest-value provider first (Claude Code), with a
substrate shape that other providers can adopt later
Architecture decision
This issue now chooses one canonical architecture for the MVP:
- add an opt-in root tail mode (
--tail, or an equivalent clearly
tail-named surface) that queries an archive-shaped overlay, not a
special live-only result model - the overlay consists of the normal archive as the base plus source
artifacts that are ahead of the archive (unseen or observed with a
newer materialized source state) - ahead-of-archive artifacts are reparsed and rematerialized through the
existing parser and archive materialization pipeline; there is no raw
file grep path and no provider-specific alternate query engine - for the MVP, the overlay must support Claude Code source sessions first
- when a tailed source artifact corresponds to a session already present
in the archive, the tailed state replaces the older archived state for
query purposes; when it is unseen, it appears as a new queryable
session - when stable ingest catches up to the same source state, tail mode stops
adding any delta for that artifact; the query result then naturally
matches ordinary archive mode again - each overlaid result must carry machine-readable provenance/freshness
describing whether it came from archive state only or from an
ahead-of-archive source observation
Design requirements
- Tail mode must preserve the same conversation/query semantics as normal
archive mode. - The implementation must keep archive meaning centralized rather than
creating a second parallel query engine with different semantics. - Existing filters such as
--since,--contains, provider filters,
and session-oriented queries must behave coherently under tail mode. - Replacement and deduplication between tailed source state and archived
state must be explicit and testable. - This should build on the temporal vocabulary from
#311rather than
inventing a separate time model. - Operator-facing language should describe tailing, freshness, or
catch-up, not "partial transcripts".
Acceptance criteria
- A user can opt into querying Claude Code sessions with ahead-of-archive
tailing instead of waiting for session close or the next scheduled
ingest. - Tail-mode results use the same query/result semantics as ordinary
archive results. - The implementation tolerates files that are being appended, rewritten,
or removed without corrupting the stable archive. - Tests cover append growth, duplicate observation, replacement of older
archived state by newer tailed state, and disappearance of the delta
after archive catch-up. - The issue records the chosen architecture clearly enough that later
provider support and#312can build on it.
Non-goals
- Full provider coverage in the first slice.
- Attention or intent inference from source-write gaps.
- Maintaining multiple long-term tail architectures in parallel.
Dependency value
This should land after #311 and is easier after #310, because tail
mode should reuse the normal query surface and content projection
contracts rather than inventing its own rendering path.
Activity
[-][feat] Realtime / live-session ingestion[/-][+][feat] Tail ahead-of-archive source sessions[/+]Sinity commentedon Apr 23, 2026
Execution note:
I am correcting the issue architecture before implementation.
The prior "live / partial transcript" wording was wrong. This slice will
instead implement tail/catch-up semantics:
Implementation direction for the MVP:
--tailroot query moderematerializing only Claude Code source files whose observed state is
ahead of
raw_conversations.file_mtimesame session advances
overlay writes are durable archive edits
I’m executing that architecture now on
feature/feat/tail-ahead-of-archive-sessions.Sinity commentedon Apr 23, 2026
Execution update for #308:
devtools verifypassed before opening the PRfeat: tail ahead-of-archive source sessions (#392)
Sinity commentedon Apr 23, 2026
Merged via PR #392: #392
Landed on
masterase714ef3b.What shipped:
--tailreuses normal query semantics instead of creating a separate live-mode ontologyVerification completed locally before merge:
mypydevtools render-alldevtools verifyfeat: tail ahead-of-archive source sessions (#392)