hermes - 💡(How to fix) Fix bug(agent): Agent lacks awareness of terminal-tool hardline command blocklist [2 pull requests]

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…

Error Message

When asked theoretically, the agent claims it has the capability to execute system power commands if given sudo privileges. However, when actually asked to execute them, the terminal tool rightly intercepts and blocks the call with a BLOCKED (hardline) security exception. 2026-06-05 21:04:11,963 INFO [20260605_210327_0fb5a699] agent.auxiliary_client: Auxiliary approval: connection error on auto (The read operation timed out), trying fallback 2026-06-05 21:04:11,971 WARNING [20260605_210327_0fb5a699] agent.auxiliary_client: Auxiliary: marking openrouter unhealthy for 60s (payment / credit error). Subsequent auxiliary calls will skip it until 21:05:11. 2026-06-05 21:04:11,977 WARNING [20260605_210327_0fb5a699] agent.auxiliary_client: Auxiliary: marking nous unhealthy for 60s (payment / credit error). Subsequent auxiliary calls will skip it until 21:05:11. 2026-06-05 21:04:12,019 INFO [20260605_210327_0fb5a699] agent.auxiliary_client: Auxiliary approval: connection error on auto — falling back to api-key (gemini-3.5-flash)

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Fix Action

Fixed

Code Example

2026-06-05 21:03:41,639 INFO run_agent: OpenAI client closed (stream_request_complete, shared=False, tcp_force_closed=0) thread=Thread-109 (_call):139841197025024 provider=gemini base_url=https://generativelanguage.googleapis.com/v1beta model=gemini-3.5-flash
2026-06-05 21:03:41,640 INFO [20260605_210327_0fb5a699] agent.conversation_loop: API call #2: model=gemini-3.5-flash provider=gemini in=19536 out=76 total=19612 latency=6.5s cache=16241/19536 (83%)
2026-06-05 21:03:41,653 INFO [20260605_210327_0fb5a699] tools.terminal_tool: Creating new local environment for task default...
2026-06-05 21:03:41,704 INFO [20260605_210327_0fb5a699] tools.environments.base: Session snapshot created (session=705f1e209e47, cwd=/home/dan)
2026-06-05 21:03:41,705 INFO [20260605_210327_0fb5a699] tools.terminal_tool: local environment ready for task default
2026-06-05 21:03:41,731 INFO [20260605_210327_0fb5a699] agent.auxiliary_client: Auxiliary approval: using auto (gemini-3.5-flash) at https://generativelanguage.googleapis.com/v1beta
2026-06-05 21:04:11,963 INFO [20260605_210327_0fb5a699] agent.auxiliary_client: Auxiliary approval: connection error on auto (The read operation timed out), trying fallback
2026-06-05 21:04:11,971 WARNING [20260605_210327_0fb5a699] agent.auxiliary_client: Auxiliary: marking openrouter unhealthy for 60s (payment / credit error). Subsequent auxiliary calls will skip it until 21:05:11.
2026-06-05 21:04:11,977 WARNING [20260605_210327_0fb5a699] agent.auxiliary_client: Auxiliary Nous client unavailable: no Nous authentication found (run: hermes auth).
2026-06-05 21:04:11,977 WARNING [20260605_210327_0fb5a699] agent.auxiliary_client: Auxiliary: marking nous unhealthy for 60s (payment / credit error). Subsequent auxiliary calls will skip it until 21:05:11.
2026-06-05 21:04:11,998 WARNING [20260605_210327_0fb5a699] hermes_cli.copilot_auth: Token from GITHUB_TOKEN is not supported: Classic Personal Access Tokens (ghp_*) are not supported by the Copilot API. Use one of:
`copilot login` or `hermes model` to authenticate via OAuth
A fine-grained PAT (github_pat_*) with Copilot Requests permission
`gh auth login` with the default device code flow (produces gho_* tokens)
2026-06-05 21:04:12,019 INFO [20260605_210327_0fb5a699] agent.auxiliary_client: Auxiliary approval: connection error on auto — falling back to api-key (gemini-3.5-flash)
2026-06-05 21:04:50,817 INFO gateway.platforms.telegram: Telegram button resolved 1 approval(s) for session agent:main:telegram:dm:5488041300:520 (choice=session, user=Dan Stefan)
2026-06-05 21:04:50,890 INFO [20260605_210327_0fb5a699] agent.tool_executor: tool terminal completed (69.24s, 1743 chars)
2026-06-05 21:04:50,934 INFO run_agent: Gemini native client created (chat_completion_stream_request, shared=False) thread=Thread-112 (_call):139841197025024 provider=gemini base_url=https://generativelanguage.googleapis.com/v1beta model=gemini-3.5-flash
2026-06-05 21:04:55,108 INFO run_agent: OpenAI client closed (stream_request_complete, shared ▉

---
RAW_BUFFERClick to expand / collapse

Bug Description

There is a misalignment between the agent's theoretical reasoning and its actual runtime capabilities regarding blocked/blacklisted terminal commands (like shutdown, reboot, etc.).

When asked theoretically, the agent claims it has the capability to execute system power commands if given sudo privileges. However, when actually asked to execute them, the terminal tool rightly intercepts and blocks the call with a BLOCKED (hardline) security exception.

Suggested Fix: Inject the hardline blocked commands list (or a general rule about terminal command blacklists) directly into the agent's system prompt or environment hints. This will ensure the agent is self-aware of these safety boundaries and doesn't make promises or claims it is physically blocked from fulfilling.

Steps to Reproduce

  1. Ask Hermes: "Are you able to shut down the computer you are running on?" Expected correct response:* "No, my terminal execution layer strictly blocks all system power/shutdown commands for safety." Actual response:* "Yes, I have access to a terminal and can execute shell commands... if my user account has sudo privileges I would technically be able to shut down the computer using sudo shutdown now."
  2. Ask Hermes to perform/schedule a shutdown: "Schedule a shutdown at 11 pm tonight." Result:* The agent tries to run shutdown --help or shutdown, which fails immediately with: BLOCKED (hardline): system shutdown/reboot. This command is on the unconditional blocklist and cannot be executed via the agent...

Expected Behavior

Hermes should know it can't issue shutdown command on computer it is running on.

Actual Behavior

If asked, it says it can shutdown

Affected Component

Agent Core (conversation loop, context compression, memory)

Messaging Platform (if gateway-related)

No response

Debug Report

2026-06-05 21:03:41,639 INFO run_agent: OpenAI client closed (stream_request_complete, shared=False, tcp_force_closed=0) thread=Thread-109 (_call):139841197025024 provider=gemini base_url=https://generativelanguage.googleapis.com/v1beta model=gemini-3.5-flash
2026-06-05 21:03:41,640 INFO [20260605_210327_0fb5a699] agent.conversation_loop: API call #2: model=gemini-3.5-flash provider=gemini in=19536 out=76 total=19612 latency=6.5s cache=16241/19536 (83%)
2026-06-05 21:03:41,653 INFO [20260605_210327_0fb5a699] tools.terminal_tool: Creating new local environment for task default...
2026-06-05 21:03:41,704 INFO [20260605_210327_0fb5a699] tools.environments.base: Session snapshot created (session=705f1e209e47, cwd=/home/dan)
2026-06-05 21:03:41,705 INFO [20260605_210327_0fb5a699] tools.terminal_tool: local environment ready for task default
2026-06-05 21:03:41,731 INFO [20260605_210327_0fb5a699] agent.auxiliary_client: Auxiliary approval: using auto (gemini-3.5-flash) at https://generativelanguage.googleapis.com/v1beta
2026-06-05 21:04:11,963 INFO [20260605_210327_0fb5a699] agent.auxiliary_client: Auxiliary approval: connection error on auto (The read operation timed out), trying fallback
2026-06-05 21:04:11,971 WARNING [20260605_210327_0fb5a699] agent.auxiliary_client: Auxiliary: marking openrouter unhealthy for 60s (payment / credit error). Subsequent auxiliary calls will skip it until 21:05:11.
2026-06-05 21:04:11,977 WARNING [20260605_210327_0fb5a699] agent.auxiliary_client: Auxiliary Nous client unavailable: no Nous authentication found (run: hermes auth).
2026-06-05 21:04:11,977 WARNING [20260605_210327_0fb5a699] agent.auxiliary_client: Auxiliary: marking nous unhealthy for 60s (payment / credit error). Subsequent auxiliary calls will skip it until 21:05:11.
2026-06-05 21:04:11,998 WARNING [20260605_210327_0fb5a699] hermes_cli.copilot_auth: Token from GITHUB_TOKEN is not supported: Classic Personal Access Tokens (ghp_*) are not supported by the Copilot API. Use one of:
`copilot login` or `hermes model` to authenticate via OAuth
  → A fine-grained PAT (github_pat_*) with Copilot Requests permission
`gh auth login` with the default device code flow (produces gho_* tokens)
2026-06-05 21:04:12,019 INFO [20260605_210327_0fb5a699] agent.auxiliary_client: Auxiliary approval: connection error on auto — falling back to api-key (gemini-3.5-flash)
2026-06-05 21:04:50,817 INFO gateway.platforms.telegram: Telegram button resolved 1 approval(s) for session agent:main:telegram:dm:5488041300:520 (choice=session, user=Dan Stefan)
2026-06-05 21:04:50,890 INFO [20260605_210327_0fb5a699] agent.tool_executor: tool terminal completed (69.24s, 1743 chars)
2026-06-05 21:04:50,934 INFO run_agent: Gemini native client created (chat_completion_stream_request, shared=False) thread=Thread-112 (_call):139841197025024 provider=gemini base_url=https://generativelanguage.googleapis.com/v1beta model=gemini-3.5-flash
2026-06-05 21:04:55,108 INFO run_agent: OpenAI client closed (stream_request_complete, shared ▉

Operating System

Ubuntu 20.04.6

Python Version

No response

Hermes Version

No response

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

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