hermes - 💡(How to fix) Fix [Bug]: Telegram image_cache writes stale content from previous image to new filename [2 pull requests]

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…

When sending a new Telegram photo to Hermes, the image_cache layer sometimes writes stale content (from a previously cached image) to the new filename. The agent then sees the wrong image when processing the turn.

Root Cause

When sending a new Telegram photo to Hermes, the image_cache layer sometimes writes stale content (from a previously cached image) to the new filename. The agent then sees the wrong image when processing the turn.

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Description

When sending a new Telegram photo to Hermes, the image_cache layer sometimes writes stale content (from a previously cached image) to the new filename. The agent then sees the wrong image when processing the turn.

Evidence

Two different images (sent ~2 minutes apart) ended up with identical content in ~/.hermes/image_cache/:

FileTimestampMD5Expected
img_3eebad265f73.jpg16:17a29ed8be05806a6ba327590395ac0eebWiFi info page (correct)
img_f43f67fcd2e3.jpg16:19a29ed8be05806a6ba327590395ac0eebADB pairing dialog (WRONG - same content as the WiFi page)

Both files are 57,391 bytes with identical MD5 hashes. The user explicitly confirmed they sent two different screenshots.

Additional evidence of the same pattern:

  • tolaria-photo.jpg (May 29 20:13) - 103,846 bytes
  • img_9de7947470a7.jpg (May 29 19:22) - 103,846 bytes (same)

This suggests a systematic dedup/cache collision rather than a one-off glitch.

Steps to Reproduce

  1. Send Image A to Hermes via Telegram
  2. Agent processes it, stored as img_xxx.jpg in image_cache
  3. Send Image B (different content) to Hermes via Telegram within a short window
  4. Agent reads image_cache - new img_yyy.jpg exists but contains Image A's content
  5. OCR/tesseract returns Image A content instead of Image B

Impact

When this bug triggers, the agent misreads the user's screenshot and sees old image content instead of what the user actually sent. Leads to incorrect responses and user confusion.

Environment

  • macOS 26.4.1
  • Hermes Agent via Telegram (DM)
  • image_cache: ~/.hermes/image_cache/
  • Config: trust_recent_files: true, trust_recent_files_seconds: 600

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…

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 - 💡(How to fix) Fix [Bug]: Telegram image_cache writes stale content from previous image to new filename [2 pull requests]