Bug Description
Document attachments (e.g. PDF) are not detected/handled correctly.
Steps to Reproduce
Send a PDF to your own Signal account (Note to Self). The agent receives the message and fetches the attachment successfully (no error), but responds as if no file was attached because [The user sent a document: '...'] context is never injected.
Expected Behavior
Document attachments (e.g. PDF) are correctly handled/passed to the LLM.
Actual Behavior
LLM is unable to "see" the document attachment.
Affected Component
Gateway (Telegram/Discord/Slack/WhatsApp)
Messaging Platform (if gateway-related)
No response
Debug Report
Collecting debug report...
--- hermes dump ---
version: 0.10.0 (2026.4.16) [(unknown)]
os: Linux 6.18.18-gentoo-dist aarch64
python: 3.13.11
openai_sdk: 2.24.0
profile: default
hermes_home: ~/.hermes
model: claude-opus-4.6
provider: copilot
terminal: local
api_keys:
openrouter not set
openai not set
anthropic not set
anthropic_token not set
nous not set
glm/zai not set
zai not set
kimi not set
minimax not set
deepseek not set
dashscope not set
huggingface not set
ai_gateway not set
opencode_zen not set
opencode_go not set
kilocode not set
firecrawl not set
tavily not set
browserbase not set
fal not set
elevenlabs not set
github not set
features:
toolsets: hermes-cli
mcp_servers: 0
memory_provider: built-in
gateway: unknown
platforms: signal
cron_jobs: 0
skills: 0
--- end dump ---
--- agent.log (last 200 lines) ---
(file not found)
--- errors.log (last 100 lines) ---
(file not found)
--- gateway.log (last 100 lines) ---
(file not found)
Operating System
Gentoo Linux
Python Version
No response
Hermes Version
No response
Additional Logs / Traceback (optional)
Root Cause Analysis (optional)
When a Signal message arrives with a PDF (or other application/* / text/* attachment),
the _handle_envelope method in signal.py leaves msg_type = MessageType.TEXT.
The document-injection code in run.py only fires when
event.message_type == MessageType.DOCUMENT, so the file path is never injected into the
agent context and the agent has no idea any attachment was sent.
Affects: Note to Self PDF/doc attachments, any non-image non-audio Signal attachment.
Proposed Fix (optional)
In src/gateway/platforms/signal.py, inside _handle_envelope, add an elif branch for
application/* and text/* MIME types after the existing image/ and audio/ checks:
--- a/src/gateway/platforms/signal.py
+++ b/src/gateway/platforms/signal.py
@@ -486,6 +486,8 @@ async def _handle_envelope(self, envelope: dict) -> None:
elif any(mt.startswith("image/") for mt in media_types):
msg_type = MessageType.PHOTO
+ elif any(mt.startswith("application/") or mt.startswith("text/") for mt in media_types):
+ msg_type = MessageType.DOCUMENT
# Parse timestamp from envelope data (milliseconds since epoch)
Are you willing to submit a PR for this?
Bug Description
Document attachments (e.g. PDF) are not detected/handled correctly.
Steps to Reproduce
Send a PDF to your own Signal account (Note to Self). The agent receives the message and fetches the attachment successfully (no error), but responds as if no file was attached because
[The user sent a document: '...']context is never injected.Expected Behavior
Document attachments (e.g. PDF) are correctly handled/passed to the LLM.
Actual Behavior
LLM is unable to "see" the document attachment.
Affected Component
Gateway (Telegram/Discord/Slack/WhatsApp)
Messaging Platform (if gateway-related)
No response
Debug Report
Operating System
Gentoo Linux
Python Version
No response
Hermes Version
No response
Additional Logs / Traceback (optional)
Root Cause Analysis (optional)
When a Signal message arrives with a PDF (or other
application/*/text/*attachment),the
_handle_envelopemethod insignal.pyleavesmsg_type = MessageType.TEXT.The document-injection code in
run.pyonly fires whenevent.message_type == MessageType.DOCUMENT, so the file path is never injected into theagent context and the agent has no idea any attachment was sent.
Affects: Note to Self PDF/doc attachments, any non-image non-audio Signal attachment.
Proposed Fix (optional)
In
src/gateway/platforms/signal.py, inside_handle_envelope, add anelifbranch forapplication/*andtext/*MIME types after the existingimage/andaudio/checks:Are you willing to submit a PR for this?