Local desktop optimization#191
Merged
Merged
Conversation
…tput fixes Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
cm2435
approved these changes
Jul 9, 2026
cm2435
left a comment
There was a problem hiding this comment.
adress 2 small comments but then good to merge
…guard to caller, None startup_hint Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…, settings deep links Co-authored-by: Cursor <cursoragent@cursor.com>
… flake Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…into antoine/local-control-fixes Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # src/hai_agents_cli/app.py # src/hai_agents_local/desktop.py
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…rtup Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ddce165. Configure here.
…CLI setup Co-authored-by: Cursor <cursoragent@cursor.com>
adeprezh
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Made with Cursor
Note
Medium Risk
Touches live local control (permissions, global Esc tap, session cancel on stop/exit) and default session limits; changes are guarded by tests but mis-stops or budget defaults could affect long-running local agents.
Overview
Local desktop now downscales and encodes screenshots before upload (
ScaledDesktopDriver, CLI flags--max-width,--image-format, etc.), requires hai-drivers>=0.1.2, and on macOS runs preflight permission checks (Accessibility / Screen Recording) before the bridge thread starts.Adds an out-of-band kill switch:
hai local stopwrites a shared stop file; on macOS desktop serve, double-Esc can trigger the same path. SDK local sessions wire a StopWatcher to cancel remote sessions and stop bridges, register atexit cancels, and apply default runaway budgets (max_steps/max_time_s) when the caller omits them.CLI: new read-only
hai doctor(login, platform, browser/desktop deps and macOS grants); Richescape()on dynamic output; session IDs shown at full width for copy-paste.Bridge reliability: retried, backoff command-channel setup (including 429 on
ensure_channel); deferred channel recreation onSessionNotFound; startup hints when readiness times out (e.g. stale Chrome on port 9222).Reviewed by Cursor Bugbot for commit 4b35293. Bugbot is set up for automated code reviews on this repo. Configure here.