hermes - 💡(How to fix) Fix Feature: Approval prompts should include the agent's contextual rationale (like Codex)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Code Example

⚠️ Command Approval Required

`hermes update`

Reason: dangerous command

---

⚠️ 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
RAW_BUFFERClick to expand / collapse

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

  • #23965 (Telegram approval messages should retain command context after approval/denial) — related but different: that issue is about the post-approval audit trail, this one is about the pre-approval rationale.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix Feature: Approval prompts should include the agent's contextual rationale (like Codex)