Skip to content

improvement(computer-use): wait for an app's first observable window after launching it - #10112

Merged
waleedlatif1 merged 2 commits into
stagingfrom
improvement/computer-use-wait-first-window
Nov 17, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
improvement/computer-use-wait-first-window

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • When get_app_state launches an app, the helper waited at most 2 s for any Accessibility window. Electron and Catalyst apps (Obsidian, VS Code, Preview) take longer, so the first read failed with app_window_unavailable and the agent had to repeat it; VS Code also failed after its AX window existed but before its frame matched an on-screen window
  • The launch wait now polls up to 8 s for an observable window: an Accessibility window whose frame matches one of the app's on-screen windows, the same match get_app_state uses to list windows. It stays cancellable and still stops if the app exits; an app that never opens a window now fails after 8 s instead of 2 s

Type of Change

  • Improvement

Testing

  • On a GUI-only run of 26 native macOS tasks, 6 tasks hit this on their first read of a just-launched app; the agent's immediate retry succeeded every time
  • Cold-start probe in fresh macOS VMs (quit the app, one get_app_state, no model calls): current staging failed both Obsidian and VS Code with app_window_unavailable after about 3.5–4 s; this branch read both on the first call (4.7 s and 3.9 s cold)
  • Native tests pass; CI desktop jobs compile the helper

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 17, 2026 2:49am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

The PR waits longer after launching an app and checks that an Accessibility window matches an entry in the app’s window list.

  • Newly launched apps wait for a window the first observation can list.

Reviews (2) · Last reviewed commit: "count a minimized window as ready and ti..." · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 1 file

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit f836354 into staging Nov 17, 2026
50 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/computer-use-wait-first-window branch November 17, 2026 03:03

This branch was previously deployed

1 inactive deployment
Preview — de76f2ab Deployed Nov 17, 2026 by vercel[bot]
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.

1 participant