hermes - ✅(Solved) Fix Discord attachments are not reliably passed into agent context [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#11860Fetched 2026-04-18 05:58:34
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

Root Cause

This breaks an important workflow. Users naturally attach:

  • HTML files
  • screenshots
  • images
  • logs
  • documents
  • other local artifacts

If Discord attachments are flaky, the agent becomes much less useful in real operational chats.

Fix Action

Fix / Workaround

In our case, an HTML file was attached in Discord for the agent to inspect. The agent could respond to the text around the message, but the attachment handling was inconsistent enough that it warranted manual checking and workaround behavior instead of being confidently available as normal input.

PR fix notes

PR #12009: fix(discord): support html attachments

Description (problem / solution / changelog)

Summary

  • add .html to the shared gateway document type allowlist
  • cache Discord HTML attachments as documents instead of skipping them
  • inject small HTML file contents into the event text for direct agent inspection

Problem

Fixes #11860.

Discord attachment handling skipped .html files entirely because the shared document allowlist did not include HTML. In practice that meant messages with attached HTML artifacts never put an accessible file path or inline content into agent context.

Solution

Treat .html as a supported document type and include it in Discord's small text-document injection path. That makes attached HTML files show up like other readable artifacts instead of being dropped as unsupported.

Verification

  • python3 -m pytest -o addopts='' tests/gateway/test_discord_document_handling.py
  • repo-local repro previously logged Unsupported document type '.html' (text/html), skipping; after the fix the HTML attachment is cached and injected into the event text

Changed files

  • gateway/platforms/base.py (modified, +1/-0)
  • gateway/platforms/discord.py (modified, +1/-1)
  • tests/gateway/test_discord_document_handling.py (modified, +20/-0)
RAW_BUFFERClick to expand / collapse

When using Hermes via Discord, file attachments are not reliably available to the agent, even when the message clearly includes an attached file.

In our case, an HTML file was attached in Discord for the agent to inspect. The agent could respond to the text around the message, but the attachment handling was inconsistent enough that it warranted manual checking and workaround behavior instead of being confidently available as normal input.

Expected behavior

Discord file attachments should be passed through to the agent in a reliable, structured way, so the agent can inspect and use them just like other user-provided inputs.

Actual behavior

The message text arrives, but file attachment availability is inconsistent or unreliable from the agent side.

Why this matters

This breaks an important workflow. Users naturally attach:

  • HTML files
  • screenshots
  • images
  • logs
  • documents
  • other local artifacts

If Discord attachments are flaky, the agent becomes much less useful in real operational chats.

Suggested scope

  • verify Discord attachment ingestion end-to-end
  • ensure attachment metadata and accessible file references are always included in agent context
  • confirm behavior for common file types like html, txt, png, jpg, pdf
  • add a regression test for Discord attachment delivery

extent analysis

TL;DR

Verify Discord attachment ingestion end-to-end to ensure reliable availability of file attachments to the agent.

Guidance

  • Check the integration between Discord and the agent to ensure that file attachments are being properly passed through and handled.
  • Verify that attachment metadata and accessible file references are included in the agent context for common file types like HTML, text, images, and documents.
  • Test the behavior for different file types to identify any specific issues or inconsistencies.
  • Consider adding a regression test for Discord attachment delivery to prevent similar issues in the future.

Example

No specific code snippet is provided as the issue lacks technical details, but an example of how to handle file attachments in a Discord integration might involve checking the message payload for attachment metadata and downloading the attached file for inspection.

Notes

The issue may be related to the specific implementation of the Discord integration or the agent's handling of file attachments. Further investigation is needed to determine the root cause of the inconsistency.

Recommendation

Apply a workaround by manually checking and verifying attachment availability until the integration can be verified and improved to ensure reliable attachment handling. This will help mitigate the impact on the workflow while a more permanent solution is developed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Discord file attachments should be passed through to the agent in a reliable, structured way, so the agent can inspect and use them just like other user-provided inputs.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix Discord attachments are not reliably passed into agent context [1 pull requests, 1 participants]