Skip to content

fix(doctor): add --no-wait flag to skip browser extension wait - #275

Open
HoneyTyagii wants to merge 1 commit into
Tencent:mainfrom
HoneyTyagii:fix/doctor-no-wait-flag
Open

HoneyTyagii wants to merge 1 commit into
Tencent:mainfrom
HoneyTyagii:fix/doctor-no-wait-flag

Conversation

@HoneyTyagii

@HoneyTyagii HoneyTyagii commented Sep 17, 2026

Copy link
Copy Markdown

Issue

Fixes #265

Problem

User reports that bsk doctor hangs indefinitely when no browser extension is connected. The default 5s wait for browser extension to connect is unnecessary for agent harnesses that manage the daemon externally (e.g. host-managed setups with BSK_AUTO_START=0). Agents invoke shell tools with fixed per-call timeouts, so an unbounded wait means the whole agent turn is consumed with no output.

Solution

Add --no-wait flag to bsk doctor command that skips the browser-connect wait entirely. This allows agents to run bsk doctor without blocking when no extension is available.

Changes

  • crates/bsk-cli/src/cli/mod.rs: Added --no-wait flag to Doctor command
  • crates/bsk-cli/src/main.rs: Updated Doctor dispatch to pass no_wait to run()
  • crates/bsk-cli/src/cli/doctor.rs: Updated run() and resolve_daemon_state() to accept no_wait parameter and skip browser wait when true

Testing

Build passes: cargo check -p bsk completed successfully.

Issue Tencent#265 reports that bsk doctor hangs indefinitely when no browser
extension is connected. The default 5s wait for browser extension to
connect is unnecessary for agent harnesses that manage the daemon
externally (e.g. host-managed setups with BSK_AUTO_START=0).

This commit adds a --no-wait flag to bsk doctor that skips the
browser-connect wait entirely, returning immediately once the daemon
is reachable. This allows agents to run bsk doctor without blocking
when no extension is available.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 17, 2026 16:04

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

bsk doctor hangs indefinitely when no browser extension is connected (Windows, agent context)

2 participants