fix(prompt): tell CLI agents not to emit MEDIA:/path tags - #13766
Merged
Conversation
The CLI has no attachment channel — MEDIA:<path> tags are only intercepted on messaging gateway platforms (Telegram, Discord, Slack, WhatsApp, Signal, BlueBubbles, email, etc.). On the CLI they render as literal text, which is confusing for users. The CLI platform hint was the one PLATFORM_HINTS entry that said nothing about file delivery, so models trained on the messaging hints would default to MEDIA: tags on the CLI too. Tool schemas (browser_tool, tts_tool, etc.) also recommend MEDIA: generically. Extend the CLI hint to explicitly discourage MEDIA: tags and tell the agent to reference files by plain absolute path instead. Add a regression test asserting the CLI hint carries negative guidance about MEDIA: while messaging hints keep positive guidance.
aj-nt
pushed a commit
to aj-nt/hermes-agent
that referenced
this pull request
May 1, 2026
…ch#13766) The CLI has no attachment channel — MEDIA:<path> tags are only intercepted on messaging gateway platforms (Telegram, Discord, Slack, WhatsApp, Signal, BlueBubbles, email, etc.). On the CLI they render as literal text, which is confusing for users. The CLI platform hint was the one PLATFORM_HINTS entry that said nothing about file delivery, so models trained on the messaging hints would default to MEDIA: tags on the CLI too. Tool schemas (browser_tool, tts_tool, etc.) also recommend MEDIA: generically. Extend the CLI hint to explicitly discourage MEDIA: tags and tell the agent to reference files by plain absolute path instead. Add a regression test asserting the CLI hint carries negative guidance about MEDIA: while messaging hints keep positive guidance.
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
…ch#13766) The CLI has no attachment channel — MEDIA:<path> tags are only intercepted on messaging gateway platforms (Telegram, Discord, Slack, WhatsApp, Signal, BlueBubbles, email, etc.). On the CLI they render as literal text, which is confusing for users. The CLI platform hint was the one PLATFORM_HINTS entry that said nothing about file delivery, so models trained on the messaging hints would default to MEDIA: tags on the CLI too. Tool schemas (browser_tool, tts_tool, etc.) also recommend MEDIA: generically. Extend the CLI hint to explicitly discourage MEDIA: tags and tell the agent to reference files by plain absolute path instead. Add a regression test asserting the CLI hint carries negative guidance about MEDIA: while messaging hints keep positive guidance.
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…ch#13766) The CLI has no attachment channel — MEDIA:<path> tags are only intercepted on messaging gateway platforms (Telegram, Discord, Slack, WhatsApp, Signal, BlueBubbles, email, etc.). On the CLI they render as literal text, which is confusing for users. The CLI platform hint was the one PLATFORM_HINTS entry that said nothing about file delivery, so models trained on the messaging hints would default to MEDIA: tags on the CLI too. Tool schemas (browser_tool, tts_tool, etc.) also recommend MEDIA: generically. Extend the CLI hint to explicitly discourage MEDIA: tags and tell the agent to reference files by plain absolute path instead. Add a regression test asserting the CLI hint carries negative guidance about MEDIA: while messaging hints keep positive guidance.
waefrebeorn
pushed a commit
to waefrebeorn/slermes
that referenced
this pull request
Jul 2, 2026
…ch#13766) The CLI has no attachment channel — MEDIA:<path> tags are only intercepted on messaging gateway platforms (Telegram, Discord, Slack, WhatsApp, Signal, BlueBubbles, email, etc.). On the CLI they render as literal text, which is confusing for users. The CLI platform hint was the one PLATFORM_HINTS entry that said nothing about file delivery, so models trained on the messaging hints would default to MEDIA: tags on the CLI too. Tool schemas (browser_tool, tts_tool, etc.) also recommend MEDIA: generically. Extend the CLI hint to explicitly discourage MEDIA: tags and tell the agent to reference files by plain absolute path instead. Add a regression test asserting the CLI hint carries negative guidance about MEDIA: while messaging hints keep positive guidance.
smasoftware
pushed a commit
to smasoftware/hermes-agent
that referenced
this pull request
Jul 18, 2026
…ch#13766) The CLI has no attachment channel — MEDIA:<path> tags are only intercepted on messaging gateway platforms (Telegram, Discord, Slack, WhatsApp, Signal, BlueBubbles, email, etc.). On the CLI they render as literal text, which is confusing for users. The CLI platform hint was the one PLATFORM_HINTS entry that said nothing about file delivery, so models trained on the messaging hints would default to MEDIA: tags on the CLI too. Tool schemas (browser_tool, tts_tool, etc.) also recommend MEDIA: generically. Extend the CLI hint to explicitly discourage MEDIA: tags and tell the agent to reference files by plain absolute path instead. Add a regression test asserting the CLI hint carries negative guidance about MEDIA: while messaging hints keep positive guidance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CLI users no longer see stray
MEDIA:/abs/pathlines in responses when the agent delivers files.Root cause
MEDIA:<path>tags are only intercepted by messaging gateway platforms (Telegram, Discord, Slack, WhatsApp, Signal, BlueBubbles, email, etc.). On the CLI there is no attachment channel, so those tags render as literal text. Theclientry inPLATFORM_HINTSwas the one platform hint that said nothing about file delivery, while several tool schemas (browser_tool,tts_tool) generically recommendMEDIA:<path>for sharing output — so agents default to that pattern on the CLI too.Changes
agent/prompt_builder.py: extend thecliplatform hint to explicitly state there is no attachment channel, tell the agent not to emitMEDIA:/pathtags, and point it at plain absolute paths instead.tests/agent/test_prompt_builder.py: regression test asserting the CLI hint carries negative guidance aboutMEDIA:while messaging hints keep positive guidance.Validation
tests/agent/test_prompt_builder.py -k 'platform_hints or cli_hint'Reported live by @teknium1 during a CLI session where the agent included
MEDIA:/abs/pathlines for image outputs and they rendered as raw text.