Skip to content

fix: start the macos cursor overlay outside the caller's directory - #381

Merged
lahfir merged 4 commits into
mainfrom
laf/command-host-idle-cwd
Nov 5, 2026
Merged

lahfir merged 4 commits into
mainfrom
laf/command-host-idle-cwd

Conversation

@lahfir

@lahfir lahfir commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator
  1. The macOS cursor overlay inherited the caller's working directory and kept it in use for the overlay session.
  2. Start the overlay in / and move the snapshot owner-selection helper into the window capture module.
  3. Related to fix: keep the command host out of the caller's directory between requests #378.

Co-authored by @Shahfarzane, based on #378.

roboeve Bot and others added 2 commits October 31, 2026 09:30
…ests

The macOS command host switches to each caller's working directory to run a request and stayed there until it exited, up to 15 idle minutes later. Tools that check whether a directory is in use saw the caller's directory as busy for that long.

The host now starts in / and returns to / after each accepted request. Rejected requests still leave the working directory alone. Tests that read or change the process working directory share a lock that restores it.

Co-Authored-By: Shah <42602105+Shahfarzane@users.noreply.github.com>
The overlay child is spawned during a request, while the command host is in the caller's directory, and runs for the whole overlay session. It inherited that directory and kept it busy after the host returned to /. It reads no relative paths, since the image path is canonicalized before dispatch.

The working-directory test guard is now unix-only, because only unix tests use it and Windows clippy failed on it as dead code. The accepted-request test uses the temp directory as the caller directory, so tests that spawn processes cannot inherit a directory that is deleted under them.
@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 Nov 4, 2026 7:27pm UTC

@lahfir
lahfir marked this pull request as ready for review October 31, 2026 09:47
@lahfir lahfir changed the title fix: keep the command host out of the caller's directory between requests fix: start the macos cursor overlay outside the caller's directory Nov 5, 2026
@lahfir
lahfir merged commit d83bfaf into main Nov 5, 2026
24 checks passed
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.
ZERLB added a commit to ZERLB/agent-desktop-mac that referenced this pull request Nov 9, 2026
…#373, vercel-labs#381, vercel-labs#376, vercel-labs#573)

Juntar el original hasta la 1.2.0: texto por la entrada (--stdin), el cursor
fuera de la carpeta de quien llama, menús nativos de la app sin ventana y el
inventario de procesos con libproc. Choques sólo en docs/json-output.md y
commands-observation.md (se conservan los dos textos). snapshot --diff ahora
toma la app y la ventana del nuevo SnapshotOwner; los menús de la app, que
ya no tienen ventana, se comparan por app.
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.

2 participants