Skip to content

browser_close can wait up to 2 minutes for a stuck download #284

Description

@itsskofficial

Follow-up to #202. browser_close (sentient/browser/service.py, the close_tool path) waits for unfinished downloads for the full 120 s download limit while holding the browser lock. With a stuck download, a real test measured 118.9 s. Meanwhile the chat turn stalls, other browser tools are blocked, and a script calling browser_close runs into the 120 s sandbox limit.

Fix: wait a short time (5 to 10 s), then cancel what's left and report it in download_errors. Add a sentence to docs/API.md saying browser_close waits briefly for downloads, since it currently says actions never wait.

Done when: closing with a stuck download returns within about 10 s and reports the cancelled download, with a test.

Activity

  1. abhinavrastogi2627 commented on Oct 11, 2026

    @abhinavrastogi2627

    I’m taking this and will implement the bounded close wait, cancellation reporting, regression coverage, and documentation update.

  2. itsskofficial commented on Oct 11, 2026

    @itsskofficial
    ContributorAuthor

    It's yours, @abhinavrastogi2627, thanks! The details are in the issue. A real stuck download (a local server that sends headers and then stalls) is the easiest way to check the close returns within about 10 s. Mention #284 in the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions