Skip to content

fix(recording): command-driven Start/Stop (§7) + header fields + plan honesty#473

Merged
Juliusolsson05 merged 1 commit into
integration/rendering-pipelinefrom
fix/session-recording-on-demand
Jul 7, 2026
Merged

fix(recording): command-driven Start/Stop (§7) + header fields + plan honesty#473
Juliusolsson05 merged 1 commit into
integration/rendering-pipelinefrom
fix/session-recording-on-demand

Conversation

@Juliusolsson05

Copy link
Copy Markdown
Owner

A plan-vs-code audit (four-lens) found the merged Session Recording feature drifted from its own plan §7. Fixes here:

The big one — recording is now command-driven, not auto. The first build auto-recorded every session from launch (a GB-burial trap) and never built the record-session:start/stop handlers + Start/Stop command the plan specified as the primary control. Now: nothing records until you run Toggle Session Recording on a pane; AGENT_CODE_SESSION_RECORD=1 is an optional auto-start power flag (off by default). Gate split: capability (command shows) = dev-debug; auto-start = the env flag.

Also from the audit:

9 recorder tests; full unit suite 427; both gates clean.

Usage after merge: AGENT_CODE_DEV_DEBUG=1 npm run dev, then run Toggle Session Recording on the pane you want to capture. Attach Recording Note marks a tick live.

🤖 Generated with Claude Code

… honesty

A plan-vs-code audit found the shipped feature drifted from
docs/rendering/session-recording-plan-2026-07.md §7: recording was
auto-only (every session written from launch — a disk-burial trap), and
the record-session:start/stop handlers + Start/Stop command the plan
specified as the PRIMARY control were never built. Fixed here:

- Recording is now COMMAND-DRIVEN and opt-in. The manager records a
  session only after startRecording() is called; observe() ignores
  events for sessions the user never started. AGENT_CODE_SESSION_RECORD
  is downgraded to an OPTIONAL auto-start power flag (off by default),
  so a normal day never silently fills GBs.
- record-session:start / :stop / :is-recording ipcMain handlers (gated
  on the capability = dev-debug), preload start/stop/isRecording, and a
  "Toggle Session Recording" command that starts/stops the focused pane
  and labels itself from live recorder state. Gate split: capability
  (command available) = dev-debug; auto-start = the env flag.
- §3 header fields the audit flagged as missing: meta.json now carries
  kind:'session-recording' + redaction:'none', and provider/cwd are
  filled from session:started (providerSessionId stays best-effort).
- §4: the queue drop-oldest path now writes a __truncated{reason:
  'queue-drop'} tombstone at the gap position (was counter-only; the
  comment claiming an inline marker was inaccurate).
- Plan §0b "As-built reconciliation": records the intentional deviations
  (folder-per-recording, command-driven) and the one real limitation
  (replay is reducer-faithful, NOT the React fold — so the fold-glue bug
  class #469 is capturable in the recording but not yet in replay; needs
  the fold extracted from the React hook, converging with #394). No
  silent drift between plan and code.

9 recorder tests (incl. on-demand + auto-record power-flag cases);
full unit suite 427; both gates clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Juliusolsson05 Juliusolsson05 merged commit 9991c48 into integration/rendering-pipeline Jul 7, 2026
@Juliusolsson05 Juliusolsson05 deleted the fix/session-recording-on-demand branch July 7, 2026 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant