Description
In McpToolInvocation.execute(), when a fatal Chrome connection error is thrown, the code re-throws immediately without calling resumeInputBlocker(). This leaves the browser agent's input blocker permanently suspended if the fatal error occurs mid-execution on an interactive tool (click, fill, etc.).
Steps to Reproduce
- Start a browser agent session with an interactive tool (e.g.,
click, fill)
- Trigger a Chrome connection failure mid-execution (e.g., Chrome process crashes or is killed)
- Observe that the input blocker remains suspended and is never restored
Expected Behavior
resumeInputBlocker() should always be called when needsBlockerSuspend is true, regardless of whether the error is fatal or not.
Actual Behavior
The fatal error path (Could not connect to Chrome) re-throws before resumeInputBlocker() is called, leaving the input blocker permanently suspended.
Code Reference
https://github.com/google-gemini/gemini-cli/blob/main/packages/core/src/agents/browser/mcpToolWrapper.ts#L159-L164
// Fatal path — re-throws before resumeInputBlocker is called
if (errorMsg.includes('Could not connect to Chrome')) {
throw error; // ← input blocker is NEVER restored
}
// Only the non-fatal path restores it
if (this.needsBlockerSuspend) {
await resumeInputBlocker(this.browserManager).catch(() => {});
}
Description
In
McpToolInvocation.execute(), when a fatal Chrome connection error is thrown, the code re-throws immediately without callingresumeInputBlocker(). This leaves the browser agent's input blocker permanently suspended if the fatal error occurs mid-execution on an interactive tool (click,fill, etc.).Steps to Reproduce
click,fill)Expected Behavior
resumeInputBlocker()should always be called whenneedsBlockerSuspendis true, regardless of whether the error is fatal or not.Actual Behavior
The fatal error path (
Could not connect to Chrome) re-throws beforeresumeInputBlocker()is called, leaving the input blocker permanently suspended.Code Reference
https://github.com/google-gemini/gemini-cli/blob/main/packages/core/src/agents/browser/mcpToolWrapper.ts#L159-L164