Repository navigation
Description
Summary
Let a recording carry the app's logs. start_recording { attachLogs: [...] } tails one or more log files (or a launched process's stdout/stderr) and writes each line to a sidecar on the video clock, the same way the input event log works. Then the index, bug_report and the review player can show "what the app said at 0:42".
Where
src/utils/events.ts:43: the existing pattern for a time-aligned sidecar (t= seconds from the first video frame).src/utils/recordingIndex.ts: the index already merges OCR, events and transcript; logs would be a fourth source.src/utils/bugReport.ts: bug reports already pull OCR'd error text from frames; real log lines are far more reliable than OCR.
Details
Today the only way to see an error message is OCR on the frames (find_text), which misses anything not on screen (stack traces, network errors, background service logs). Most desktop-app bugs need both the video and the log, and lining them up by hand is the tedious part.
Proposed sidecar <recording>.logs.jsonl:
{ "t": 42.18, "source": "app.log", "level": "error", "line": "NullReferenceException at ..." }Impact
bug_reportattaches the log lines around the failure moment, already redacted.search_recording "exception"finds the moment in the video.- A flight recorder for agents (Bigger bet: a flight recorder for computer-use agents (always-on capture aligned to the agent's tool calls) #272) gets the most useful channel for free.
Suggested fix
attachLogs: [{ path, label?, levelRegex? }]onstart_recording; follow the file from its current end, handling rotation/truncation.- Stamp lines with the same clock the event logger uses; flush on stop/pause.
- Add
logsas a source inrecordingIndex.tsand a "Log excerpt" section inbug_report(lines within ±N s of the marked failure). - Run log lines through the same secret patterns as
find_textbefore writing a bug report. - Optional later:
pipelineop to render a log ticker overlay.
Acceptance criteria
- Log lines land in a sidecar with timestamps aligned to the video (within one frame interval)
- Rotation and truncation of the source file are handled
-
search_recordingandbug_reportuse the sidecar - Secret-looking tokens are masked in bug reports
- Retention prunes the sidecar with the recording
Getting started
- Relevant files:
src/utils/events.ts,src/utils/recordingIndex.ts,src/utils/bugReport.ts,src/tools/startRecording.ts - Tests:
npm test
Related: #272
Filed by repo-audit/feature-ideas at 19569f7. Severity: high. Effort: M. audit-key: enhancement|src/tools/startRecording.ts|attachLogs
Activity
TMHSDigital commentedon Nov 15, 2026
Done in d4f83b3: start_recording logs [{path, label}] follows up to 5 files (polling, rotation- and truncation-safe) and writes .logs.jsonl on the video clock, with error and warn flagged. index_recording indexes the lines (masked), bug_report has an App logs section, and delete_recording removes the sidecar. Verified with unit tests, a real-file tailer test (rotate, truncate, partial lines), and a live recording through the tool layer: the pre-existing line was skipped, the CRLF and split lines came out right, and the error line was flagged. Launched-process stdout capture and a log overlay were not added.