Gateway media attachments not reaching AI agents
NousResearch/hermes-agent · cluster 18204 · gateway
Data as of
3 open items. Fix merged in #25782. Check it covers your case.
The short answer
- Known?
- Yes. 10 related items grouped here, 3 issues already closed.
- Fix event
- A fix was merged to main in PR #25782. Check it covers your case. No release data is tracked.
- Tracker
- The maintainers' tracker marks this
partially resolved, deciding PR #25782. That is separate from the fix event. - Still open
- 2 issues and 1 PR.
Next step: read #25782, then check whether your report is one of the 2 still open.
Read #25782Pick up a Lab taskMultiple issues and fixes concern image, video, and file attachments being dropped or silently ignored when routed through gateway slash commands and background/deferred agent tasks across Telegram, Discord, Slack, and other platforms. The work spans both bug reports and corresponding fixes for preserving and forwarding media payloads to agents.
Open issues2
Open PRs1
- PR#57946fix(gateway): preserve media attachments in /steer and /goal kickoff events
Fixes on record
-
#25782 fix(gateway): forward image attachments to background agent tasks (#25603)
files:
gateway/run.pyShow the diff
-
gateway/run.py@@ -10355,6 +10355,10 @@ async def _handle_background_command(self, event: MessageEvent) -> str: event_message_id = self._reply_anchor_for_event(event) + # Forward image/audio attachments so the background agent can see them. + media_urls = list(event.media_urls) if event.media_urls else [] + media_types = list(event.media_types) if event.media_types else [] + # Fire-and-forget the background task _task = asyncio.create_task( self._run_background_task( @@ -10362,6 +10366,8 @@ async def _handle_background_command(self, event: MessageEvent) -> str: source, task_id, event_message_id=event_message_id, + media_urls=media_urls, + media_types=media_types, ) ) self._background_tasks.add(_task) @@ -10376,10 +10382,15 @@ async def _run_background_task( source: "SessionSource", task_id: str, event_message_id: Optional[str] = None, + media_urls: Optional[List[str]] = None, + media_types: Optional[List[str]] = None, ) -> None: """Execute a background agent task and deliver the result to the chat.""" from run_agent import AIAgent + media_urls = media_urls or [] + media_types = media_types or [] + adapter = self.adapters.get(source.platform) if not adapter: logger.warning("No adapter for platform %s in background task %s", source.platform, task_id) @@ -10415,6 +10426,23 @@ async def _run_background_task( self._service_tier = self._load_service_tier() turn_route = self._resolve_turn_agent_config(prompt, model, runtime_kwargs) + # Enrich the prompt with image descriptions so the background + # agent can see user-attached images (same as the main flow). + enriched_prompt = prompt + if media_urls: + image_paths = [] + for i, path in enumerate(media_urls): + mtype = media_types[i] if i < len(media_types) else "" + if mtype.startswith("image/"): + image_paths.append(path) + if image_paths: + try: + enriched_prompt = await self._enrich_message_with_vision( + prompt, image_paths, + ) + except Exception as e: + logger.warning("Background task vision enrichment failed: %s", e) + def run_sync(): agent = AIAgent( model=turn_route["model"], @@ -10446,7 +10474,7 @@ def run_sync(): ) try: return agent.run_conversation( - user_message=prompt, + user_message=enriched_prompt, task_id=task_id, ) finally:
-
3 PRs closed without merging
From the close comments: done elsewhere 1 · merged via another change 1 · stale or abandoned 1
- #18243 fix(gateway): process inbound video messages via ffmpeg extraction · stale or abandoned
-
#25603 fix(gateway): forward image attachments to background agent tasks · merged via another change →
#25782 -
#41408 fix(gateway): expose cached video file path to AI agent for Telegram video messages · done elsewhere →
2a5dc0e,#41366
Closed issues · 3
How this cluster was grouped
-
Link evidence (
partly structural links): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text. - Members outside that structural core may belong to a different underlying problem.
-
Pairwise link density
0.14: the share of item pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36.1.00means every pair is linked.
Pick up a Lab task
Check whether a fix covers the open issues here, with your own agent. Bring back evidence for maintainers.
Open the LabAt a glance
- Subsystem
- gateway
- Merged PRs
- #25782
- Closed issues
- 3
- Attempts
- 3 PRs closed without merging
- Fix link checked
- 14 May 2026