Bug Description
On Hermes Desktop for Windows, pasting a screenshot into the chat composer attaches the same image twice.
The duplicate attachments are saved as two separate files under:
C:\Users\ianar\AppData\Roaming\Hermes\composer-images\
Example from one paste:
composer_2026-06-02_18-33-43-065_224319.png
composer_2026-06-02_18-33-43-065_9c6f14.png
Both appear to be the same screenshot.
Steps to Reproduce
- On Windows 11, take/copy a screenshot to the clipboard.
- Open Hermes Desktop.
- Paste the screenshot into the chat composer.
- Observe the image appears as two attachments.
Expected Behavior
The pasted screenshot should attach once.
Actual Behavior
The pasted screenshot attaches twice.
Suspected Cause
The composer paste handler extracts image blobs from both clipboard.items and clipboard.files.
On Windows/Electron, the same clipboard image can appear through both paths. The current dedupe uses Set<Blob>(), which only dedupes the same object reference. Electron may provide two different Blob/File objects containing the same image, so both are saved.
Relevant code observed locally:
Possible Fix
Either:
- Prefer
clipboard.items and skip clipboard.files if image blobs were already found, or
- Dedupe by image metadata/content-like signature such as
type + size + name + lastModified, rather than Blob object identity.
Environment
- OS: Windows 11
- App: Hermes Desktop
- Repo: NousResearch/hermes-agent
Bug Description
On Hermes Desktop for Windows, pasting a screenshot into the chat composer attaches the same image twice.
The duplicate attachments are saved as two separate files under:
C:\Users\ianar\AppData\Roaming\Hermes\composer-images\Example from one paste:
composer_2026-06-02_18-33-43-065_224319.pngcomposer_2026-06-02_18-33-43-065_9c6f14.pngBoth appear to be the same screenshot.
Steps to Reproduce
Expected Behavior
The pasted screenshot should attach once.
Actual Behavior
The pasted screenshot attaches twice.
Suspected Cause
The composer paste handler extracts image blobs from both
clipboard.itemsandclipboard.files.On Windows/Electron, the same clipboard image can appear through both paths. The current dedupe uses
Set<Blob>(), which only dedupes the same object reference. Electron may provide two different Blob/File objects containing the same image, so both are saved.Relevant code observed locally:
apps/desktop/src/app/chat/composer/index.tsxhandlePasteextractClipboardImageBlobs(event.clipboardData)apps/desktop/src/app/chat/composer/text-utils.tsextractClipboardImageBlobsclipboard.itemsandclipboard.filesSet<Blob>()Possible Fix
Either:
clipboard.itemsand skipclipboard.filesif image blobs were already found, ortype + size + name + lastModified, rather than Blob object identity.Environment