{"repo":"NousResearch/hermes-agent","public_id":"18204","display_label":"Gateway media attachments not reaching AI agents","summary":"Multiple 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.","subsystem":"gateway","counts":{"members":10,"open_issues":2,"open_issues_distinct":2,"open_prs":1,"closed_issues":3,"merged_prs":1,"attempt_prs":4},"landed_fix":{"status":"merged_to_main","basis":"structural","pr":25782},"resolution":{"state":"partially_resolved","by":"pr-25782"},"freshness":{"state":"verified","last_verified_at":"2026-05-14T15:01:35+00:00","is_stale":false},"grouping":{"backbone":"STRUCTURAL_PARTIAL","link_density":0.14311111111111113},"fix_edges":[{"issue_number":25614,"pr_number":25782,"tier":"verified","basis":"closing_ref","confidence":0.95,"recoverable_from_timeline":true}],"members":[{"kind":"issue","number":18204,"title":"Inbound videos from all platforms (WeChat, etc.) are silently ignored — no transcription, no vision analysis","url":null,"state":"open"},{"kind":"issue","number":25614,"title":"[Bug]: /btw and /background drop image attachments — background agent never sees them","url":null,"state":"closed"},{"kind":"issue","number":41366,"title":"Telegram incoming video messages cached but never exposed to AI agent","url":null,"state":"closed"},{"kind":"issue","number":57928,"title":"BUG - file attachment broken","url":null,"state":"open"},{"kind":"issue","number":67041,"title":"/queue slash command does not accept images in Discord gateway","url":null,"state":"closed"},{"kind":"pr","number":18243,"title":"fix(gateway): process inbound video messages via ffmpeg extraction","url":null,"state":"closed","close_reason":{"category":"stale_abandoned","implication":"active"},"merged":false},{"kind":"pr","number":25603,"title":"fix(gateway): forward image attachments to background agent tasks","url":null,"state":"closed","close_reason":{"refs":[{"kind":"pr","value":"#25782","number":25782}],"category":"merged_via","implication":"superseded"},"merged":false},{"kind":"pr","number":25782,"title":"fix(gateway): forward image attachments to background agent tasks (#25603)","url":null,"state":"merged","close_reason":{"category":"merged","implication":"superseded"},"merged":true,"is_fix_pr":true,"fix_tier":"verified","files_changed":["gateway/run.py"],"fix_hunks":[{"file":"gateway/run.py","hunks":["@@ -10355,6 +10355,10 @@ async def _handle_background_command(self, event: MessageEvent) -> str:\n \n         event_message_id = self._reply_anchor_for_event(event)\n \n+        # Forward image/audio attachments so the background agent can see them.\n+        media_urls = list(event.media_urls) if event.media_urls else []\n+        media_types = list(event.media_types) if event.media_types else []\n+\n         # Fire-and-forget the background task\n         _task = asyncio.create_task(\n             self._run_background_task(","@@ -10362,6 +10366,8 @@ async def _handle_background_command(self, event: MessageEvent) -> str:\n                 source,\n                 task_id,\n                 event_message_id=event_message_id,\n+                media_urls=media_urls,\n+                media_types=media_types,\n             )\n         )\n         self._background_tasks.add(_task)","@@ -10376,10 +10382,15 @@ async def _run_background_task(\n         source: \"SessionSource\",\n         task_id: str,\n         event_message_id: Optional[str] = None,\n+        media_urls: Optional[List[str]] = None,\n+        media_types: Optional[List[str]] = None,\n     ) -> None:\n         \"\"\"Execute a background agent task and deliver the result to the chat.\"\"\"\n         from run_agent import AIAgent\n \n+        media_urls = media_urls or []\n+        media_types = media_types or []\n+\n         adapter = self.adapters.get(source.platform)\n         if not adapter:\n             logger.warning(\"No adapter for platform %s in background task %s\", source.platform, task_id)","@@ -10415,6 +10426,23 @@ async def _run_background_task(\n             self._service_tier = self._load_service_tier()\n             turn_route = self._resolve_turn_agent_config(prompt, model, runtime_kwargs)\n \n+            # Enrich the prompt with image descriptions so the background\n+            # agent can see user-attached images (same as the main flow).\n+            enriched_prompt = prompt\n+            if media_urls:\n+                image_paths = []\n+                for i, path in enumerate(media_urls):\n+                    mtype = media_types[i] if i < len(media_types) else \"\"\n+                    if mtype.startswith(\"image/\"):\n+                        image_paths.append(path)\n+                if image_paths:\n+                    try:\n+                        enriched_prompt = await self._enrich_message_with_vision(\n+                            prompt, image_paths,\n+                        )\n+                    except Exception as e:\n+                        logger.warning(\"Background task vision enrichment failed: %s\", e)\n+\n             def run_sync():\n                 agent = AIAgent(\n                     model=turn_route[\"model\"],","@@ -10446,7 +10474,7 @@ def run_sync():\n                 )\n                 try:\n                     return agent.run_conversation(\n-                        user_message=prompt,\n+                        user_message=enriched_prompt,\n                         task_id=task_id,\n                     )\n                 finally:\n"]}]},{"kind":"pr","number":41408,"title":"fix(gateway): expose cached video file path to AI agent for Telegram video messages","url":null,"state":"closed","close_reason":{"refs":[{"kind":"commit","value":"2a5dc0ef3df433a36abed9ee544ea067d807c438","number":0},{"kind":"pr","value":"#41366","number":41366}],"category":"implemented_elsewhere","implication":"superseded"},"merged":false,"is_fix_pr":true,"fix_tier":"suggested","fix_detail_withheld":true},{"kind":"pr","number":57946,"title":"fix(gateway): preserve media attachments in /steer and /goal kickoff events","url":null,"state":"open","close_reason":{"category":"silent_close","implication":"active"},"merged":false}],"trust":{"default_tier":"verified","includes_suggested":false}}