Browser Use cannot upload files because file chooser / setInputFiles is not exposed in Codex Desktop IAB
What variant of Codex are you using?
App (Desktop)
What happened?
Codex Desktop Browser Use can inspect real <input type="file"> controls in the in-app browser, but it cannot attach local files to them.
In a Drupal content form, Browser Use could see three file inputs:
files[field_image_hero_0][],accept="image/*"files[field_image_title_card_0][],accept="image/*"files[field_image_portrait_0],accept="image/*"
The site rendered the expected upload controls and file constraints, but Browser Use could not upload files.
Expected behavior
Browser Use should support file upload automation for real file inputs, equivalent to upstream Playwright's locator.setInputFiles(...).
Actual behavior
The Codex Browser Use PlaywrightLocator runtime does not expose setInputFiles.
A live capability check returned:
typeof tab.playwright.locator("input[type=file]").setInputFiles
// "undefined"
The bundled Browser Use skill documents a limited Playwright subset, and setInputFiles is not listed in the exposed locator API.
Why this matters
This blocks realistic browser QA and smoke testing for common workflows such as:
- CMS image/file upload fields
- media library forms
- attachment workflows
- any app that requires local file selection before save/submit
The workaround is manual handoff to the native file picker, which prevents fully automated validation.
Notes
This appears Codex-specific, not a general Playwright limitation. Upstream Playwright supports file uploads through locator.setInputFiles() for <input type="file">.
Related but not duplicate:
- #20642: external/detachable Browser Use support
7 Comments
I face the same issue.
Would like for this feature to be made available.
I hit the same file-upload limitation in a real utility/account portal on macOS.
The flow required attaching a lease PDF through an older popup-style upload widget. In the Codex in-app Browser, clicking the browse/attachment control did not open a usable file picker, and drag-and-drop did not work either, so the required document could not be uploaded.
Using normal Google Chrome for the same portal flow worked: the file picker opened, the PDF uploaded successfully, and the request could be submitted.
So the practical issue is that Browser Use/IAB currently has no reliable way to attach local files to upload controls. That blocks common admin workflows where a PDF or image attachment is mandatory.
I originally filed this separately as #23187, then closed it after finding this issue.
This limitation is causing issues for our workflows because it means that many features cannot be tested by browser use. We have to resort to workarounds such as usign the chrome extension or using the agent-browser CLI for file uploads.
Still reproducible on Windows Codex Desktop with Browser plugin build
26.803.41515, even though the current Browser skill now exposeswaitForEvent("filechooser")andPlaywrightFileChooser.setFiles(...).Sanitized repro against a signed-in Microsoft Power Apps import dialog:
input[type="file"]plus a visible Browse button.tab.playwright.waitForEvent("filechooser", { timeoutMs: 10000 })before clicking.locator('input[type="file"]').click({ force: true })also times out (the runtime reported a 3-second chooser timeout despite the requested 10 seconds) and reset the browser-control session after the unhandled rejection.No credentials or private file contents were involved. This blocks an otherwise fully automated release-validation flow: upload a locally built solution ZIP, import it, and verify the imported tools. So the newer chooser API is a good direction, but it has not resolved the original limitation for this common React/Power Apps upload surface.
Reproduced on the current Codex for Windows build:
26.803.10989.026.803.8150926200This also fails with the currently documented file-chooser flow (not only with the unavailable
locator.setInputFiles()API):Actual result:
The chooser event never arrives, no attachment appears in the signed-in
chatgpt.comcomposer, and manual upload is still required. This confirms that the newerwaitForEvent("filechooser")+chooser.setFiles(...)path does not resolve the underlying IAB upload limitation on this Windows build.Additive evidence: the exact restriction is baked into the bundled tool's own instructions, not just an absent API surface.
From the shipped plugin source (\
plugins/cache/openai-bundled/browser/<version>/scripts/browser-service.mjs\, embedded "Handle file inputs and uploads" doc block):So the model is explicitly told not to reach for it even where it might otherwise exist in the underlying Playwright layer. Same reproduction signature as this issue, hit independently against chatgpt.com's composer (
Add photos & filesmenu → hidden#upload-filesinput, multi-file, enabled, but no visible bounding box) from a Codex Desktop in-app browser session — chooser wait times out, no native picker, zero attachment.One framing suggestion for the fix: gating
setInputFilesbehind the same operator-approved, single-session browser context the chooser flow already runs in (rather than exposing it unconditionally) would address the likely reason it's fenced off — an autonomous agent silently injecting files into an arbitrary untrusted page — while still unblocking the legitimate case (an already-approved automation attaching files to a hidden input in a tab the operator already opened).I built a community Codex skill that standardizes the currently exposed chooser workflow where it works, verifies the result, and adds optional clipboard and ZIP fallbacks. It does not add the missing direct
setInputFilesprimitive, so unsupported custom controls can still require manual selection:Codex File Bridge
I tested it in Codex Desktop’s in-app browser on macOS across several upload architectures:
<input type="file">followed by a multipart form submission. The file was selected, submitted, and displayed under its original basename.chooser.setFiles(...)populated the hidden input, and the page received the original filename, MIME type, and byte size.C:\\fakepath\\<filename>value while its inspectedFileListappeared empty. The skill correctly treated that as evidence of selection, not proof of server receipt. The site’s blocking JavaScript result dialog later stalled Browser Use, which remains documented as a partial result rather than a successful submission.The public test targets included DLP Test, The Internet File Uploader, Expand Testing, and WebDriver University.
The primary workflow is:
accept,multiple, and visible size or type restrictions.waitForEvent("filechooser")before clicking either the actual input or its associated visible control.chooser.setFiles(...).If no chooser event arrives, the skill inspects the page before retrying. When the destination visibly supports pasted attachments, it can use a site-specific clipboard fallback. If the field accepts ZIP files, it can also create a safe bundle that preserves inner filenames and relative paths. If the page supports neither chooser upload nor attachment paste, the skill stops rather than pretending it bypassed the missing
setInputFilesprimitive.For the specific case of attaching files to a ChatGPT Pro composer, use the dedicated ChatGPT Clipboard Upload skill. That workflow bypasses the chooser through clipboard attachments, reads the UUID-derived name ChatGPT assigns, and supplies a generated-name → original-name manifest. It also offers a ZIP fallback that preserves filenames inside the archive.
Bug reports are welcome in the Codex File Bridge issue tracker.