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.
Follow-up to #202.
browser_close(sentient/browser/service.py, theclose_toolpath) 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 callingbrowser_closeruns 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 todocs/API.mdsayingbrowser_closewaits 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.