Skip to content

Browser attachments timeout when ChatGPT renames uploaded files (01.jpg → 01(5).jpg) #393

Description

@dougvk

Summary

With --engine browser --browser-attachments always, Oracle can time out waiting for attachments even after ChatGPT has accepted the files and enabled Send.

ChatGPT renames colliding uploads (01.jpg01(5).jpg, document.mddocument(20260818-145702).md). Oracle's chip/name matcher still looks for the original basename. For short names such as 01.jpg, 01 is shorter than the 6-character extensionless fallback, and 01.jpg is not a substring of 01(5).jpg, so the wait never completes.

Increasing --browser-attachment-timeout does not help. The files are already in the composer.

This is distinct from #221 / #214 (Send never becomes ready) and #275 (file input has the original name but no chip evidence). Here the chips exist, Send is enabled, and the original names are gone because ChatGPT renamed them.

Reproduced on @steipete/oracle@0.18.0 against a signed-in ChatGPT browser session.

Environment

  • Oracle: 0.18.0
  • Engine: browser, attach to an already-running Chrome DevTools endpoint
  • --browser-attachments always
  • ChatGPT composer shows an enabled button[data-testid="send-button"]

Minimal reproduction

Use short, colliding names (the second run against the same composer is enough):

mkdir -p /tmp/oracle-rename-repro
printf 'Synthetic diagnostic text. No secrets.\n' > /tmp/oracle-rename-repro/document.md
# any small JPEG is enough; filename is the point
printf '\xff\xd8\xff\xd9' > /tmp/oracle-rename-repro/01.jpg

npx -y @steipete/oracle@0.18.0 \
  --engine browser \
  --model gpt-5.6-sol \
  --browser-attachments always \
  --force \
  --slug oracle-rename-repro-one \
  -p "Diagnostic only. Reply exactly OK." \
  --file /tmp/oracle-rename-repro/document.md \
  --file /tmp/oracle-rename-repro/01.jpg

Repeat the same command (same filenames, same ChatGPT composer). The second run is the reliable fail: ChatGPT keeps the previous 01.jpg collision and labels the new chip 01(5).jpg / document(<timestamp>).md.

Actual

Oracle reports one of:

ERROR: Attachments did not finish uploading before timeout.
User error (browser-automation): Attachments did not finish uploading before timeout.

or

ERROR: Attachments never reached a clickable send button after 45s; tune --browser-attachment-timeout.

After the failure, the ChatGPT composer already has:

  • a chip like Remove file 1: document(20260818-145702).md
  • a chip like Remove file 2: 01(5).jpg
  • Send enabled
  • no uploading/busy state
  • no alert

The hidden input[type=file] may still list 01.jpg while the visible chip uses the renamed label. waitForAttachmentCompletion / matchesExpected() require attachedNames to include the original basename (or a ≥6-char stem). 01.jpg matches neither 01(5).jpg nor a stem of length ≥6.

A control run with unique long names (synthetic-post-document.md + synthetic-post-image-01.jpg) finishes in ~20s on the same session.

Longer names such as document.md can still pass after rename because the stem document is ≥6 characters and is a substring of document(20260818-145702).md. That is why markdown-only uploads often succeed and adding 01.jpg fails.

Expected

Treat ChatGPT's collision rename as the same file:

  • name.ext should match name(N).ext and name(<digits>).ext
  • readiness should succeed when chips exist, upload is idle, and Send is enabled, even if the visible label is a collision rename

Workaround for callers: give every --file a unique basename longer than 6 characters. That should not be required once Oracle recognizes the renamed chip.

Suggested matcher

In src/browser/actions/attachments.ts (matchesExpected / equivalent chip matching), accept:

^<stem>(\(\d+\))?\. <ext>$

case-insensitively, in addition to the current includes / ellipsis / ≥6-char stem checks.

No logs, cookies, account data, or conversation content are included in this report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Urgent regression or broken agent/channel workflow affecting real users now.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossThis issue is about lost, duplicated, misrouted, or suppressed channel messages.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions