Repository navigation
feat(recording): Session Recording slice 1 — recorder core + gate + funnel tap (#467) - #471
Merged
Juliusolsson05 merged 1 commit intoJul 7, 2026
Conversation
…unnel tap (#467) First slice of the continuous session recorder (docs/rendering/session-recording-plan-2026-07.md). Produces per-recording folders; no replay yet. - Each recording is its OWN folder session-recordings/<recordingId>/ with meta.json + events.jsonl, so `rm -rf` one folder removes exactly one recording (the requested cleanup affordance). - SessionRecorder clones GhostJournal's batched-drain writer and adds the two things a CONTINUOUS recorder needs that a per-turn ghost log did not (both #388-mandated): backpressure (queue cap + drop-oldest + counter) and a 128 MiB size cap + tombstone (cap, never rotate). - SessionRecorderManager taps sendToMainWindow via a decoupled optional outbound observer (mainWindow.ts setOutboundObserver) — records the exact payloads the renderer receives, filtered to the 9 SessionFeed channels (explicit allowlist, NOT the session: prefix which also carries raw PTY). Tapping the funnel (not the ledger seam) is what lets replay reach fold-layer bugs like #469. - Attach-Recording-Note plumbing (reserve-instant + fill-on-submit __note lines) lands in the recorder now; the command/UI is a later slice. - Doubly gated: AGENT_CODE_DEV_DEBUG=1 AND AGENT_CODE_SESSION_RECORD=1 (isSessionRecordingEnabled). The manager + observer are only constructed when gated on, so a normal build installs no observer and pays nothing. Flushed on before-quit beside ghostJournals. NOT yet: retention bucket (next slice — required before heavy use), replay harness, redaction, the note command/UI. 6 recorder tests; full unit suite 399 passing; both tsc gates clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
First slice of #467 (plan:
docs/rendering/session-recording-plan-2026-07.md). Records; no replay yet.session-recordings/<recordingId>/withmeta.json+events.jsonl—rm -rfone folder removes exactly one recording (the requested cleanup shape).SessionRecorderclonesGhostJournal's batched-drain writer + adds the two continuous-recorder essentials Incident forensics hardening: catch fast heap bursts, cap feed-debug, journal retention, detect prior-run OOMs #388 mandates: backpressure (queue cap + drop-oldest + counter) and a 128 MiB cap + tombstone (cap, never rotate).SessionRecorderManagertapssendToMainWindowthrough a decoupled optional observer, filtered to the 9 SessionFeed channels (explicit allowlist — thesession:prefix also carries raw PTY). Funnel tap, not ledger seam, so replay can reach fold-layer bugs like fix(claude-queue): priority-aware queue reconstruction — completed agents stuck as queued + queued prompt vanishing #469.__notelines); command/UI later.AGENT_CODE_DEV_DEBUG+AGENT_CODE_SESSION_RECORD); the observer is only installed when gated on, so a normal build pays nothing.Not yet (next slices): the budgeted
debugRetentionbucket (required before heavy use), the replay harness, redaction, the note command/UI.6 recorder tests; full unit suite 399 passing (the one failing file is the pre-existing empty voice-dictation submodule test); both tsc gates clean.
🤖 Generated with Claude Code