hermes - ✅(Solved) Fix Telegram: accept .rar and .7z archive uploads as document attachments [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#28791Fetched 2026-05-20 04:01:58
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×4cross-referenced ×1

Telegram currently rejects .rar and .7z archive uploads before the agent can cache or inspect them. .zip archives are already accepted as document attachments, so users can ask the agent to inspect them with ordinary terminal tools. .rar and .7z should follow the same inbound-upload path.

Root Cause

Telegram currently rejects .rar and .7z archive uploads before the agent can cache or inspect them. .zip archives are already accepted as document attachments, so users can ask the agent to inspect them with ordinary terminal tools. .rar and .7z should follow the same inbound-upload path.

Fix Action

Fixed

PR fix notes

PR #28792: feat(gateway): accept rar and 7z document uploads

Description (problem / solution / changelog)

Summary

  • accept .rar and .7z as supported gateway document attachments
  • keep archive uploads cached as documents so the agent can inspect them with existing terminal/file workflows
  • add Telegram and shared document-cache regressions for the new archive types

Closes #28791.

Notes

This intentionally does not add archive extraction behavior or bundle extractor binaries. It only lets the gateway cache the uploaded archive and pass the local path to the agent, matching existing .zip behavior from #4846.

Test Plan

  • RED: /usr/local/lib/hermes-agent/venv/bin/python -m pytest tests/gateway/test_document_cache.py::TestSupportedDocumentTypes::test_expected_extensions_present tests/gateway/test_telegram_documents.py::TestDocumentDownloadBlock::test_archive_document_cached -q failed for missing .rar/.7z
  • GREEN: /usr/local/lib/hermes-agent/venv/bin/python -m pytest tests/gateway/test_document_cache.py::TestSupportedDocumentTypes::test_expected_extensions_present tests/gateway/test_telegram_documents.py::TestDocumentDownloadBlock::test_archive_document_cached -q
  • /usr/local/lib/hermes-agent/venv/bin/python -m pytest tests/gateway/test_document_cache.py tests/gateway/test_telegram_documents.py -q
  • git diff --check

Changed files

  • gateway/platforms/base.py (modified, +2/-0)
  • tests/gateway/test_document_cache.py (modified, +11/-1)
  • tests/gateway/test_telegram_documents.py (modified, +28/-0)
RAW_BUFFERClick to expand / collapse

Summary

Telegram currently rejects .rar and .7z archive uploads before the agent can cache or inspect them. .zip archives are already accepted as document attachments, so users can ask the agent to inspect them with ordinary terminal tools. .rar and .7z should follow the same inbound-upload path.

Steps to reproduce

  1. Run Hermes gateway with Telegram enabled.
  2. Send a .rar archive as a Telegram document attachment.
  3. Observe the gateway response: Unsupported document type '.rar'. Supported types: ...

Expected behavior

Telegram .rar and .7z uploads are cached as document attachments and passed to the agent as local file paths, just like .zip uploads.

The gateway should not automatically extract the archive and Hermes should not bundle archive extractors. If the user wants contents inspected, the agent can use the existing terminal/file workflow with whatever tools are available on the host or backend (unrar, 7z, unar, etc.).

Actual behavior

The Telegram adapter checks SUPPORTED_DOCUMENT_TYPES before downloading the file. Since .rar and .7z are not in the allowlist, the attachment is rejected before the agent ever receives a local path.

Related context

  • #4846 added .zip upload support and made cached gateway files available to terminal backends.
  • #14307 added .rar and .7z to MEDIA: extraction for outbound document delivery, but does not affect inbound Telegram uploads.
  • #23045 tracks a related Telegram UX issue where unsupported-document errors are routed through the agent pipeline instead of being sent directly to the user.
  • #27245 added an arbitrary-attachment escape hatch for Discord; this issue is the narrower Telegram archive parity case.

Proposed scope

  • Add .rar and .7z to the shared document allowlist.
  • Add focused Telegram/document-cache regression tests.
  • Do not add archive extraction behavior or new runtime dependencies.

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

Telegram .rar and .7z uploads are cached as document attachments and passed to the agent as local file paths, just like .zip uploads.

The gateway should not automatically extract the archive and Hermes should not bundle archive extractors. If the user wants contents inspected, the agent can use the existing terminal/file workflow with whatever tools are available on the host or backend (unrar, 7z, unar, etc.).

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 Telegram: accept .rar and .7z archive uploads as document attachments [1 pull requests, 1 participants]