Bug Description
Generated images are saved under the newer Hermes cache path (~/.hermes/cache/images/...), but Telegram media delivery from a final gateway response did not deliver the image. Copying the exact same generated image into the legacy path (~/.hermes/image_cache/...) and sending it via MEDIA: worked immediately.
This looks like a cache-root mismatch/regression around image generation output paths vs the gateway media delivery pipeline/allowlist.
Observed Behavior
In a Telegram group chat, image_generate returned a local file path like:
/Users/hermes/.hermes/cache/images/openai_codex_gpt-image-2-medium_20260524_165209_f2f01ae4.png
The assistant final response included:
MEDIA:/Users/hermes/.hermes/cache/images/openai_codex_gpt-image-2-medium_20260524_165209_f2f01ae4.png
The user did not receive the image.
As a workaround, the same file was copied to the legacy cache root:
/Users/hermes/.hermes/image_cache/system-ops-hermes-avatar.png
Then sending:
MEDIA:/Users/hermes/.hermes/image_cache/system-ops-hermes-avatar.png
worked in the same Telegram chat.
Expected Behavior
Images generated by image_generate should be saved to, or normalized into, a gateway-deliverable media cache path. A MEDIA: tag pointing at a generated image should upload the image natively to Telegram without the agent needing to know which cache directory is currently deliverable.
Actual Behavior
image_generate produced a file under ~/.hermes/cache/images, but the Telegram user did not receive it when emitted in the final response. The legacy ~/.hermes/image_cache path did deliver.
Steps to Reproduce
- In a Telegram gateway session, call
image_generate.
- Let the tool return a local path under
~/.hermes/cache/images/....
- Include that path in the final response as
MEDIA:/absolute/path/to/generated.png.
- Observe that the image is not delivered to the user.
- Copy the file into
~/.hermes/image_cache/....
- Send the copied path via
MEDIA:/absolute/path/to/copied.png.
- Observe that Telegram delivery succeeds.
Environment
- Platform: Telegram group chat
- Host OS: macOS
- Hermes home:
/Users/hermes/.hermes
- Generated file path:
~/.hermes/cache/images/...
- Working file path:
~/.hermes/image_cache/...
- Provider/model for image generation in this instance:
openai-codex / gpt-image-2-medium
Related Issues
This issue is more specific: the image is already a local file, but the generated local cache path (cache/images) does not behave like the legacy deliverable path (image_cache) for Telegram delivery from the final response.
Possible Fix Direction
Unify generated media output with the gateway's validated/deliverable media roots. Options:
- Have
image_generate write/copy generated images into the same deliverable cache root used by Telegram (image_cache or the canonical equivalent).
- Normalize
~/.hermes/cache/images to a deliverable root during gateway MEDIA: extraction/validation.
- Add a regression test that a generated image path under the current image-generation cache can be delivered through the Telegram media pipeline, not only the legacy
image_cache path.
Bug Description
Generated images are saved under the newer Hermes cache path (
~/.hermes/cache/images/...), but Telegram media delivery from a final gateway response did not deliver the image. Copying the exact same generated image into the legacy path (~/.hermes/image_cache/...) and sending it viaMEDIA:worked immediately.This looks like a cache-root mismatch/regression around image generation output paths vs the gateway media delivery pipeline/allowlist.
Observed Behavior
In a Telegram group chat,
image_generatereturned a local file path like:The assistant final response included:
The user did not receive the image.
As a workaround, the same file was copied to the legacy cache root:
Then sending:
worked in the same Telegram chat.
Expected Behavior
Images generated by
image_generateshould be saved to, or normalized into, a gateway-deliverable media cache path. AMEDIA:tag pointing at a generated image should upload the image natively to Telegram without the agent needing to know which cache directory is currently deliverable.Actual Behavior
image_generateproduced a file under~/.hermes/cache/images, but the Telegram user did not receive it when emitted in the final response. The legacy~/.hermes/image_cachepath did deliver.Steps to Reproduce
image_generate.~/.hermes/cache/images/....MEDIA:/absolute/path/to/generated.png.~/.hermes/image_cache/....MEDIA:/absolute/path/to/copied.png.Environment
/Users/hermes/.hermes~/.hermes/cache/images/...~/.hermes/image_cache/...openai-codex/gpt-image-2-mediumRelated Issues
image_cacheThis issue is more specific: the image is already a local file, but the generated local cache path (
cache/images) does not behave like the legacy deliverable path (image_cache) for Telegram delivery from the final response.Possible Fix Direction
Unify generated media output with the gateway's validated/deliverable media roots. Options:
image_generatewrite/copy generated images into the same deliverable cache root used by Telegram (image_cacheor the canonical equivalent).~/.hermes/cache/imagesto a deliverable root during gatewayMEDIA:extraction/validation.image_cachepath.