Problem
When Hermes requests approval for a dangerous command, the prompt currently shows only a static pattern label as the reason (e.g. "dangerous command", "service restart", "filesystem deletion").
Example of what the Telegram gateway shows:
⚠️ Command Approval Required
`hermes update`
Reason: dangerous command
The user has to infer from context WHY the agent wants to run this command — which is often unclear, especially when multiple things are happening in a session.
Desired Behavior (inspired by Codex)
Before presenting the approval prompt, the agent should include a brief contextual explanation of why the command is needed in the current task context. For example:
⚠️ Command Approval Required
I just installed a Hermes update that requires a gateway restart to take effect.
`systemctl --user restart hermes-gateway`
Reason: service restart
This makes approval decisions much easier — the user knows why the command is necessary before choosing Allow/Deny.
Suggested Implementation
- Allow the agent / LLM to prepend a contextual explanation to the approval prompt
- This could be:
- An additional text field in
prompt_dangerous_approval() (e.g. contextual_reason)
- Or the agent writes the explanation as a normal message before the tool call, and the approval system preserves it
- The static
description from detect_dangerous_command() would remain as supplementary info
Related
Problem
When Hermes requests approval for a dangerous command, the prompt currently shows only a static pattern label as the reason (e.g. "dangerous command", "service restart", "filesystem deletion").
Example of what the Telegram gateway shows:
The user has to infer from context WHY the agent wants to run this command — which is often unclear, especially when multiple things are happening in a session.
Desired Behavior (inspired by Codex)
Before presenting the approval prompt, the agent should include a brief contextual explanation of why the command is needed in the current task context. For example:
This makes approval decisions much easier — the user knows why the command is necessary before choosing Allow/Deny.
Suggested Implementation
prompt_dangerous_approval()(e.g.contextual_reason)descriptionfromdetect_dangerous_command()would remain as supplementary infoRelated