My overnight autonomous run setup: goals, stop-conditions, and real-browser verification

Sharing the setup that finally made overnight agent runs trustworthy for me.

The problem: leave an agent working overnight and you wake up to either (a) it stopped after 20 minutes declaring victory, or (b) it “finished” something that doesn’t actually work in a browser.

The setup:

  1. A goal with a blocking stop-condition. I set the goal at session start; a Stop hook refuses to let the session end until the condition is verifiably met. No more early victory laps — the agent literally cannot stop with the work half-done.
  2. Real-browser verification as part of the goal. The goal text says “verify in a real browser” — so the agent drives an actual browser (via the Playwright MCP server), clicks through the flows, and reads what a user would see. This caught a CORS bug that every curl-based check missed: the API answered curl fine and failed only under a browser’s preflight.
  3. The board as the paper trail. Every fix lands as a task with a work log, so the next morning I read a timeline instead of reconstructing what happened from a 400-message transcript.

Result from one night: an auth redirect bug, a broken email-verification link path, and the CORS issue — all found, fixed, deployed, and browser-verified while I slept.

The lesson that generalizes: “tested with curl” and “works in a browser” are different claims. Make the agent prove the second one.