{"repo":"NousResearch/hermes-agent","public_id":"1561","display_label":"MEDIA tag leaking into message output, fixes","summary":"A bug where MEDIA: directives and [[audio_as_voice]] tags were leaking into visible message output, along with multiple fix attempts addressing stripping these tags from streamed and gateway messages.","subsystem":"gateway","counts":{"members":3,"open_issues":0,"open_issues_distinct":0,"open_prs":0,"closed_issues":1,"merged_prs":1,"attempt_prs":1},"landed_fix":{"status":"merged_to_main","basis":"structural","pr":1642,"merged_at":"2026-03-17T08:47:35+00:00"},"resolution":{"state":"resolved","by":"pr-1642"},"freshness":{"state":"stale","last_verified_at":"2026-03-17T08:47:35+00:00","is_stale":true},"grouping":{"backbone":"STRUCTURAL_SPANNING","link_density":0.6666666666666666},"fix_edges":[{"issue_number":1561,"pr_number":1642,"tier":"verified","basis":"closing_ref","confidence":0.95,"recoverable_from_timeline":true,"pr_merged_at":"2026-03-17T08:47:35+00:00"}],"members":[{"kind":"issue","number":1561,"title":"[Bug] MEDIA: and [[audio_as_voice]] tags leaking into message output","url":null,"state":"closed"},{"kind":"pr","number":1611,"title":"fix(gateway): strip MEDIA: and [[audio_as_voice]] tags from message body","url":null,"state":"closed","close_reason":{"refs":[{"kind":"pr","value":"#1642","number":1642}],"category":"merged_via","implication":"superseded"},"merged":false},{"kind":"pr","number":1642,"title":"fix(gateway): strip MEDIA: and [[audio_as_voice]] tags from message body","url":null,"state":"merged","close_reason":{"category":"merged"},"merged":true,"is_fix_pr":true,"fix_tier":"verified","files_changed":["gateway/platforms/base.py"],"fix_hunks":[{"file":"gateway/platforms/base.py","hunks":["@@ -840,6 +840,9 @@ async def _process_message_background(self, event: MessageEvent, session_key: st\n                 \n                 # Extract image URLs and send them as native platform attachments\n                 images, text_content = self.extract_images(response)\n+                # Strip any remaining internal directives from message body (fixes #1561)\n+                text_content = text_content.replace(\"[[audio_as_voice]]\", \"\").strip()\n+                text_content = re.sub(r\"MEDIA:\\s*\\S+\", \"\", text_content).strip()\n                 if images:\n                     logger.info(\"[%s] extract_images found %d image(s) in response (%d chars)\", self.name, len(images), len(response))\n                 \n"]}]}],"trust":{"default_tier":"verified","includes_suggested":false}}