Skip to content

fix: honor accept_downloads in CDP browsers - #5991

Open
Dante-dan wants to merge 1 commit into
browser-use:mainfrom
Dante-dan:fix/5981-honor-accept-downloads
Open

Dante-dan wants to merge 1 commit into
browser-use:mainfrom
Dante-dan:fix/5981-honor-accept-downloads

Conversation

@Dante-dan

@Dante-dan Dante-dan commented Oct 3, 2026 •

Copy link
Copy Markdown

accept_downloads=False currently has no effect on the CDP download setup: the downloads watchdog always configures Browser.setDownloadBehavior with allow, even when a local browser explicitly disables downloads.

This change configures deny when download acceptance is disabled and keeps the existing download path and events for the enabled case. PDF/network auto-downloads also respect accept_downloads, so that path cannot bypass the setting.

Refs #5981 and the diagnosis by depper-IA in #5981 (comment).

Validation:

  • The new watchdog regression failed on the unmodified implementation (allow instead of deny). It drives the actual watchdog with a mocked CDP client; this is not a reproduction on the reported website.
  • 30 focused repository tests passed across download setup, PDF/network acceptance, remote completion callbacks, filename sanitization, and agent download paths.
  • ./bin/lint.sh --staged passed (Ruff check/format, Pyright, and the configured pre-commit hooks). Local setup used the project virtualenv on PATH, a writable pre-commit cache, and Python 3.11 for the configured hooks.

The full CI suite and a live-browser download were not run locally.


Summary by cubic

Fixes accept_downloads=False being ignored by CDP browsers. Previously, the downloads watchdog always configured Browser.setDownloadBehavior with allow, so downloads were permitted even when explicitly disabled. Now, when download acceptance is disabled, the watchdog sets behavior to deny, and PDF/network auto-downloads also respect the setting. Regression tests cover both enabled and disabled cases.

Written for commit 0efd673. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Re-trigger cubic

sun04222 added a commit to sun04222/browser-use that referenced this pull request Oct 23, 2026
@github-actions

Copy link
Copy Markdown

👋 This PR has been automatically marked as stale because it hasn't had activity for 45 days.

To keep this PR open:

  • Rebase against the latest main branch
  • Address any review feedback or merge conflicts
  • Add a comment explaining the current status
  • Add the work-in-progress label if you're still actively working on this

This will be automatically closed in 14 days if no further activity occurs.

Thanks for contributing to browser-use! 🤖

@github-actions github-actions Bot added the stale label Nov 18, 2026

This branch has not been deployed

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant