NousResearch/hermes-agent
Image attachments not forwarded to background agent tasks
Cluster 25614. Data as of
Nothing open on GitHub. Fix merged in #25782 on 14 May 2026. Check it covers your case.
The short answer
0open issues
0open PRs
3items grouped
- Known?
- Yes. 3 related items grouped here, 1 issue 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
resolved, deciding PR #25782. That is separate from the fix event. - Still open
- Nothing open on GitHub.
The members appear to concern image attachments being dropped when using /btw or /background, so the background agent does not receive them. Two members are titled as gateway fixes to forward attachments, and one is a bug report; the titles alone do not show whether any change was merged or works.
Open issues0
Open PRs0
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:
-
1 PR closed without merging
From the close comments: merged via another change 1
-
#25603 fix(gateway): forward image attachments to background agent tasks · merged via another change →
#25782
Closed issues · 1
- Closed#25614[Bug]: /btw and /background drop image attachments — background agent never sees them
How this cluster was grouped
-
Link evidence (
structural links throughout): every member is connected by structural evidence: shared changed files, or a closing/superseded reference. -
Pairwise link density
0.67: 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
- Merged PRs
- #25782
- Closed issues
- 1
- Attempts
- 1 PR closed without merging
- Fix link checked
- 14 May 2026