AgentFixboard

Program never exits when using Browser(keep_alive=True)

With Browser(keep_alive=True), the script stops after the first task and asyncio.run() never returns.

From GitHub

browser-use/browser-use

Difficulty
Easy
Time
~5 min
Steps
1
Fixed in
0.11.11
Last checked

Verified fix: PR #4112 merged on . Fixed in 0.11.11 (first stable release containing the merge commit). Last checked .

Symptom

With Browser(keep_alive=True), the script stops after the first task and asyncio.run() never returns.

Evidence what you'll see

  • Only the first task's output is printed
  • Seen with the follow-up tasks example on 0.11.2

Cause

Closing a keep-alive session didn't stop its internal event bus, so the event loop never finished.

Fix steps

0 of 1 done

Your check marks stay in this browser only.

Verify the fix worked

  • Run the follow-up tasks example and confirm both tasks finish and the program exits.

Sources and credit

Summarized in our own words from these public reports. Credit goes to their authors.

Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change

Hit an error we don't cover? Submit it