Skip to content

Harden local control startup and CLI output#191

Open
abonneth wants to merge 8 commits into
mainfrom
antoine/local-control-fixes
Open

Harden local control startup and CLI output#191
abonneth wants to merge 8 commits into
mainfrom
antoine/local-control-fixes

Conversation

@abonneth

@abonneth abonneth commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Made with Cursor


Note

Medium Risk
Changes how local sessions are cancelled (exit hooks, kill switch) and how bridges connect to the platform; mostly safety hardening but affects live agent control on user machines.

Overview
Adds hai doctor for read-only checks (login, platform, browser/desktop deps, macOS TCC on desktop) with fix hints and --json, and bumps the desktop extra to hai-drivers[desktop]>=0.1.2.

CLI/local UX: Rich escape() on user-facing strings so brackets in errors and pip extras render correctly; session list IDs use a non-truncating column. hai local stop files a shared stop signal; desktop serving gets --screenshot-max-width (default 1920), double-Esc on macOS when Input Monitoring allows, plus StopWatcher on bridges.

Local bridges: Command-channel setup retries 429s and transient HTTP with backoff; transport surfaces rate limits on channel create/check. Browser not-ready timeouts include a stale debug-port hint; desktop macOS permission preflight and optional ScaledDesktopDriver to avoid huge screenshot uploads.

SDK local sessions: Default runaway max_steps / max_time_s when auto-bridges start; atexit and kill-switch _panic_stop cancel remote sessions and stop bridges; manager treats stop during setup as startup failure.

Reviewed by Cursor Bugbot for commit 31f90bc. Bugbot is set up for automated code reviews on this repo. Configure here.

…tput fixes

Co-authored-by: Cursor <cursoragent@cursor.com>
@abonneth abonneth requested a review from adeprezh as a code owner July 9, 2026 16:08
Comment thread src/hai_agents_local/bridge.py
Co-authored-by: Cursor <cursoragent@cursor.com>

@cm2435 cm2435 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

adress 2 small comments but then good to merge

Comment thread src/hai_agents_local/bridge.py Outdated
Comment thread src/hai_agents_local/desktop.py Outdated
Comment thread src/hai_agents_local/bridge.py
abonneth and others added 4 commits July 9, 2026 19:04
…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>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8a430e9. Configure here.

Comment thread src/hai_agents_local/sessions.py
abonneth and others added 2 commits July 10, 2026 14:30
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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