-
Notifications
You must be signed in to change notification settings - Fork 817
Description
Issue Description
When chrome-headless-shell.exe is manually closed, agent-browser enters a broken state and cannot recover automatically.
OS: windows 10
Steps to Reproduce
agent-browser open example.comThis command starts chrome-headless-shell.exe.
If I manually close this process (I expected this to behave the same as running agent-browser close), then any subsequent command fails, with no useful error information to indicate what went wrong.
Example:
$ agent-browser open example.com
✗ Browser not launched. Call launch first.At this point, agent-browser is essentially unusable.
Workaround
Running the following command resolves the issue:
$ agent-browser close
✓ Browser closedExpected Behavior
Since the browser process has already exited, agent-browser should be able to detect this state automatically and recover by itself (e.g. internally calling close or resetting its state), instead of remaining in an error state with misleading messages.
Currently, because there is no clear error context or diagnostic information, it’s very difficult to locate the root cause from the user/agent side.
I believe agent-browser should handle this situation more gracefully.