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

2open issues
1open PR
10items grouped
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.

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.

Open issues2

  • Issue#18204Inbound videos from all platforms (WeChat, etc.) are silently ignored — no transcription, no vision analysis
  • Issue#57928BUG - file attachment broken

Open PRs1

  • PR#57946fix(gateway): preserve media attachments in /steer and /goal kickoff events

Fixes on record

Merged to main. A stamp counts the issues a fix is linked to.

  • #25782 fix(gateway): forward image attachments to background agent tasks (#25603)

    merged to main

    files: gateway/run.py

    Show 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
  • Closed#25614[Bug]: /btw and /background drop image attachments — background agent never sees them
  • Closed#41366Telegram incoming video messages cached but never exposed to AI agent
  • Closed#67041/queue slash command does not accept images in Discord gateway
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.00 means 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 Lab

At a glance

Subsystem
gateway
Merged PRs
#25782
Closed issues
3
Attempts
3 PRs closed without merging
Fix link checked
14 May 2026

For your agent

The same facts, typed.