You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(session-flow): teach the transcript reader eight current record types #5931
plugins/session-flow/scripts/transcript_reader.py (#5925) does not know eight record types that appear on current Claude Code versions. Counts are from one machine's corpus, 2026-10-02:
Record type
Count
atis-latch
6,331
mode
6,284
ai-title
2,525
bridge-session
1,582
relocated
1,127
file-history-delta
956
cost-state
111
fork-context-ref
53
The drift check therefore reports unknown-record-type on every real run. That is advisory and doesn't degrade a metric, but it buries any real drift.
Done when
The reader classifies each of the eight types, as used or deliberately ignored, with a test fixture per type.
A drift run over a current corpus reports no unknown-record-type.
If ai-title carries a usable title, it serves predecessor linkage beside custom-title in link_keys. 31 of 33 /clear successors in the spike could be linked through a carried title or agent name.
Notes
The transcript format is documented as internal and changes between versions, so the census in collect.py census|drift is how new types surface.
The first real audit-sessions collect (session-flow 0.46.0, Claude Code up to 2.1.288, 135 sessions) found 11 unknown record types, not 8. These three are new:
Type
Records
frame-link
29
artifact-comment-monitor
1
artifact-autoreact-ledger
1
Current counts for the original eight: atis-latch 7,537, mode 7,434, ai-title 2,550, bridge-session 1,582, file-history-delta 1,199, relocated 1,127, cost-state 145, fork-context-ref 53.
Routing: delegable (work-class: scoped, feature, priority: medium). Verified against current main: the shared reader's RECORD_TYPES set knows none of the 11 types named in the body and the 2026-10-03 comment, so record_kind returns unknown for each and the collector counts them as unknown-record-type. The title says "eight"; the live count is eleven.
Basis: plugins/session-flow/scripts/transcript_reader.py:71-87 (RECORD_TYPES), plugins/session-flow/skills/audit-sessions/scripts/collect.py:287-291 (unknown kinds return early from the scan).
Agent Brief
Type: Feature Summary: Teach the shared transcript reader the eleven record types current Claude Code versions write, so the drift census stops reporting them as unknown.
Current behavior:
The shared transcript reader's known-type set (RECORD_TYPES, consulted by record_kind) omits atis-latch, mode, ai-title, bridge-session, relocated, file-history-delta, cost-state, fork-context-ref, frame-link, artifact-comment-monitor and artifact-autoreact-ledger. Every real audit-sessions collect reports each as unknown-record-type, which buries genuine drift. Unknown kinds currently return early from the collector's scan, so they feed no metric.
Desired behavior:
Each of the eleven types is classified as either used (feeds a metric or a link key) or deliberately ignored (recognized, feeds nothing), and the classification is visible in the code.
A type marked ignored is recognized by record_kind but contributes to no metric: making it "known" must not let it fall through into token, turn, timing or other counting that unknown kinds skip today.
If an ai-title record carries a usable title string, the session's link keys expose it beside custom_title so /clear successors can be linked to their predecessor; any stored title is redacted and governed by the same excerpt setting as custom_title.
Key interfaces:
RECORD_TYPES and record_kind() in the shared transcript reader module.
The collector's session record link_keys object (new optional key for the AI title, if used; absent reads as null per the store's additive-field rule).
Acceptance criteria:
All eleven types are known to the reader; each is documented as used or ignored.
One synthetic, minimal fixture per type (eleven fixtures), hand-written, never excerpted from a real transcript. Tests show each fixture is recognized and that ignored types change no metric.
Edit the reader in the file the shared-copies registry names as its canonical (today that is session-flow's own file; if a copy registration has landed, edit the canonical and regenerate). Regenerate every registered copy with the shared-copies sync script and bump every carrying plugin's version and CHANGELOG. The sync --check passes.
Out of scope:
Moving the reader's canonical location (tracked separately).
Migrating other session-flow readers onto the shared reader (tracked separately).
New metrics built on these record types beyond the optional AI-title link key.
Operator check after merge (not a worker criterion): a drift run over a current corpus reports no unknown-record-type for these eleven types.
Approve this for autonomous dispatch, or keep it for a human?
Triage marked this delegable as a feature-shaped C3 (work-class: scoped). The work-loop admission gate human-gates feature-shaped C3 work, so the lane removed agent-ready and applied needs-human. To dispatch it, flip it back through /work-items:attend-queue.
All eleven types (the body's eight plus the three from the 2026-10-03 comment) are now known to the shared reader. ai-title feeds a new link_keys.ai_title (redacted, dropped under --excerpt-chars 0); the other ten are in IGNORED_RECORD_TYPES and the collector skips them before any metric. The performance plugin's copy was regenerated.
Verified locally: affected tests and the selected pytest suites pass, and a new test shows ignored records with leak-bait fields change no metric (it fails if the skip is removed). Sync, changelog and ruff checks pass.
Left for a human: the post-merge drift run over a real corpus. Claude Code 2.1.296 also writes types outside this issue (for example tag, summary, ended-by-model, continued-in), so a drift run may still list some of those. That would be a follow-up.
The needs-human label (from the work-loop admission gate) is left for Kyle to clear.
Next step: Review the draft PR; decisions for Kyle are listed in its body. Mark it ready once Kyle agrees (that starts the CI test and review lanes), then drive CI green.
Where a branch is listed it is pushed, so it can be taken over as is. A draft PR shows a red ci-status by design until it is marked ready.
Activity
feat(session-flow): add audit-sessions with a durable session store a…
kyle-sexton commentedon Oct 3, 2026
The first real
audit-sessionscollect (session-flow 0.46.0, Claude Code up to 2.1.288, 135 sessions) found 11 unknown record types, not 8. These three are new:frame-linkartifact-comment-monitorartifact-autoreact-ledgerCurrent counts for the original eight:
atis-latch7,537,mode7,434,ai-title2,550,bridge-session1,582,file-history-delta1,199,relocated1,127,cost-state145,fork-context-ref53.kyle-sexton commentedon Oct 4, 2026
This was generated by AI during triage.
Routing: delegable (
work-class: scoped, feature,priority: medium). Verified against current main: the shared reader'sRECORD_TYPESset knows none of the 11 types named in the body and the 2026-10-03 comment, sorecord_kindreturnsunknownfor each and the collector counts them asunknown-record-type. The title says "eight"; the live count is eleven.Basis:
plugins/session-flow/scripts/transcript_reader.py:71-87(RECORD_TYPES),plugins/session-flow/skills/audit-sessions/scripts/collect.py:287-291(unknown kinds return early from the scan).Agent Brief
Type: Feature
Summary: Teach the shared transcript reader the eleven record types current Claude Code versions write, so the drift census stops reporting them as unknown.
Current behavior:
The shared transcript reader's known-type set (
RECORD_TYPES, consulted byrecord_kind) omitsatis-latch,mode,ai-title,bridge-session,relocated,file-history-delta,cost-state,fork-context-ref,frame-link,artifact-comment-monitorandartifact-autoreact-ledger. Every real audit-sessions collect reports each asunknown-record-type, which buries genuine drift. Unknown kinds currently return early from the collector's scan, so they feed no metric.Desired behavior:
record_kindbut contributes to no metric: making it "known" must not let it fall through into token, turn, timing or other counting that unknown kinds skip today.ai-titlerecord carries a usable title string, the session's link keys expose it besidecustom_titleso/clearsuccessors can be linked to their predecessor; any stored title is redacted and governed by the same excerpt setting ascustom_title.Key interfaces:
RECORD_TYPESandrecord_kind()in the shared transcript reader module.link_keysobject (new optional key for the AI title, if used; absent reads as null per the store's additive-field rule).Acceptance criteria:
--checkpasses.Out of scope:
Operator check after merge (not a worker criterion): a drift run over a current corpus reports no
unknown-record-typefor these eleven types.kyle-sexton commentedon Oct 4, 2026
This was generated by AI during work-loop.
Approve this for autonomous dispatch, or keep it for a human?
Triage marked this delegable as a feature-shaped C3 (
work-class: scoped). The work-loop admission gate human-gates feature-shaped C3 work, so the lane removedagent-readyand appliedneeds-human. To dispatch it, flip it back through/work-items:attend-queue.Lane: work-loop, instance melo-worker-1, cycle 1.
kyle-sexton commentedon Oct 11, 2026
Draft PR: #7066 (branch
feat/5931-transcript-reader-record-types).ai-titlefeeds a newlink_keys.ai_title(redacted, dropped under--excerpt-chars 0); the other ten are inIGNORED_RECORD_TYPESand the collector skips them before any metric. The performance plugin's copy was regenerated.tag,summary,ended-by-model,continued-in), so a drift run may still list some of those. That would be a follow-up.needs-humanlabel (from the work-loop admission gate) is left for Kyle to clear.Generated by Claude Code
kyle-sexton commentedon Oct 11, 2026
Handoff note for whoever picks this up next. The overnight Claude run has stopped, and Kyle is moving issue work to Cursor.
feat/5931-transcript-reader-record-typesWhere a branch is listed it is pushed, so it can be taken over as is. A draft PR shows a red
ci-statusby design until it is marked ready.Generated by Claude Code