Skip to content

Bug: wait_for_change with target "full" always fails with "No monitors found" #180

Closed

Description

@TMHSDigital

Why it matters

wait_for_change is the core "act, then verify" primitive, and full is the most natural target. Today every call with target: "full" throws No monitors found., and the shipped verify-ui-change workflow tells agents to call it exactly that way. So the default UI-verification loop fails on first use.

Evidence

  • src/utils/resolveTarget.ts:53: the fallthrough for full returns { target: parsed, monitors: [] }.
  • src/tools/waitForChange.ts:82: const area = targetSize(target, monitors);
  • src/utils/diff.ts:49: case "full": if (monitors.length === 0) throw new ScreencastError("No monitors found.");
  • src/tools/startRecording.ts:179 already works around the same gap (target.kind === "full" ? await getMonitors() : monitors), which confirms the resolver's contract is surprising.
  • src/prompts.ts uses target || "full" as the default for its recording prompts.

Suggested approach

Have resolveCaptureTarget return await getMonitors() for full too, so every caller gets the desktop geometry it needs. Then drop the special case in startRecording.

Done when

  • wait_for_change { target: "full" } returns a change or a timeout, not an error.
  • A unit test covers resolveCaptureTarget("full") returning a non-empty monitor list (mock getMonitors).
  • A handler-level test covers wait_for_change with full.

Activity

  1. added
    bug
    effort: small
    impact: high
    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: smallimpact: highpriority: high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions