Skip to content

fix: preserve partial snapshots after observation expires - #372

Merged
lahfir merged 2 commits into
mainfrom
laf/issue-356-snapshot
Nov 4, 2026
Merged

lahfir merged 2 commits into
mainfrom
laf/issue-356-snapshot

Conversation

@lahfir

@lahfir lahfir commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator
  1. Partial snapshots could fail with a lock timeout after their observation deadline expired.
  2. Snapshots and waits now preserve partial results using the existing recovery write budget.
  3. Related: macOS: snapshot enumerates every off-screen row of long tables (Notes: 85 s, 1581 refs) #356.

@vercel

vercel Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
agent-desktop Ignored Ignored Preview, v0 Oct 31, 2026 4:52am UTC

@israelvicars

Copy link
Copy Markdown

Another repro for this, from the plain CLI on 1.0.2 (npm), macOS 26.6 (25G72). No batch or wait is involved.

The target is a Finder window listing a folder of 1,500 empty files. A full -i walk of it takes about 15 s.

Command Result
agent-desktop snapshot --app Finder --window-id <id> -i (no flag) ok:true, complete:false, ~3.05 s, ~740–990 nodes observed
same with --timeout-ms 3000 (also 4000, 5000, 8000, 10000) ok:false, TIMEOUT, exit 1, ~20–30 ms after the deadline
same with --timeout-ms 30000 ok:true, complete:true, ~15 s

The error details are {"kind":"lock_timeout","path":"refstore.lock","purpose":"ref store lock","contention_count":0}. It reproduces in a fresh, empty AGENT_DESKTOP_HOME. The next call without the flag succeeds, so nothing is holding the lock.

An explicit --timeout-ms 3000 fails where the default 3000 ms budget returns the documented partial result. So the trigger seems to be the explicit flag, not the deadline itself. A CLI-level test with an explicit --timeout-ms might be worth adding. I haven't tested this branch.

@lahfir
lahfir merged commit 53e072d into main Nov 4, 2026
24 checks passed
ZERLB added a commit to ZERLB/agent-desktop-mac that referenced this pull request Nov 4, 2026
…, vercel-labs#372, vercel-labs#524)

Junta los 4 commits nuevos del original: servidor MCP, inventario sin apps cerradas, lectura parcial conservada e instalación por Homebrew.
lucamaraschi added a commit to lucamaraschi/agent-desktop that referenced this pull request Nov 5, 2026
Brings in stdin for text commands (vercel-labs#373), partial snapshots after observation
expires (vercel-labs#372), the macOS workspace inventory fix (vercel-labs#371) and the cursor overlay
start directory fix (vercel-labs#381).

main reads --stdin text before dispatch and redacts the result, and dispatch
judges the command first, so a refused command consumes the text and delivers
nothing. The gate records the raw outcome, and the policy stores are still
released after the envelope is printed. Command facts carry no text, so piped
text cannot reach a verdict or the history. A process test now pins the refusal
and that the envelope and stderr never repeat the text.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants