Skip to content

A WGC recording ended by the window closing is reported as hitting maxDurationSec #240

Closed

Description

@TMHSDigital

Why it matters

When the user closes the app mid-recording, the agent is told "Recording already ended at its maxDurationSec cap (3600s)". The agent then misreads what happened, for example reporting a timeout or retrying with a longer cap.

Evidence

  • src/wgcRecorder.ts:128-129: when the window closes, finish() runs and the process exits 0.
  • src/tools/startRecording.ts:305-308: any clean, unrequested exit is recorded as endReason: maxDurationSec > 0 ? "max_duration" : "stopped", and the default cap is 3600.

Suggested approach

Have the WGC recorder exit with a distinct code (or print a stderr marker) when the window closes, and add endReason: "window_closed" with matching stop_recording text. Also compare elapsed time against the cap before claiming max_duration.

Done when

A unit test of the exit classifier covers a clean exit with the window-closed marker → window_closed, and a clean exit before the cap without a marker isn't reported as max_duration.

Activity

  1. added
    bug
    priority: low
    effort: small
    on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugeffort: smallpriority: low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions