Skip to content

wait stable: a settle primitive so agents stop guessing sleeps #1049

Description

@thymikee

Context

There is no way to wait for "the screen stopped changing", so agents (and our own demo scripts, and the maintainer's boot.sh) insert guessed sleep 2 between actions and snapshots. The mid-render evidence is concrete: post-relaunch snapshots on a dev-client app captured 5-node trees (healthy/tree quality — just early) that grew to 50+ nodes two seconds later. Guessed sleeps are either wasted time or flaky reads; small models especially cannot calibrate them.

Expectation

agent-device wait stable [quietMs] [timeoutMs] (defaults ~500/10000): resolves when consecutive cheap tree captures (interactive-only, or the digest from #1047 if that lands first) are unchanged for quietMs; returns how long settling took and the final capture stats so the wait doubles as a freshness signal. Must ride the existing wait-command plumbing and runner snapshot backend — no new runner protocol. Document in help workflow as the replacement for sleeps in the core loop. Acceptance: replaces the sleeps in a scripted relaunch→verify flow with equal or better reliability on the test app.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions