hermes - ✅(Solved) Fix [Bug]: when start hermes from hermes_cli/main.py, no toolsets used in system prompt even configured using 'python hermes setup' [1 pull requests, 1 participants]

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…
GitHub stats
NousResearch/hermes-agent#13410Fetched 2026-04-22 08:06:39
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Participants
Timeline (top)
referenced ×3cross-referenced ×1labeled ×1

Error Message

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Fix Action

Fixed

PR fix notes

PR #13444: fix(cli): 保留用户配置的工具集,当命令为 None 时不覆盖为 None

Description (problem / solution / changelog)

问题

当通过 hermes_cli/main.py 启动 hermes 且 args.command 为 None 时,代码会将 args.toolsets 强制设为 None,即使用户在 python hermes setup 中已配置了工具集。这导致系统提示词中永远不会出现已配置的工具集。

修复

将 toolsets 从强制覆盖列表中移除,改为仅在未设置时默认为 None,从而保留用户配置。

变更

  • hermes_cli/main.py: 修改 args.command is None 分支,保留已配置的 toolsets
  • tests/hermes_cli/test_tools_config.py: 新增 2 个测试验证修复

测试

  • test_toolsets_preserved_when_command_is_none: 验证已配置的工具集被保留
  • test_toolsets_defaults_to_none_when_not_set: 验证未设置时默认为 None

Fixes #13410

Changed files

  • hermes_cli/main.py (modified, +3/-1)
  • tests/hermes_cli/test_tools_config.py (modified, +75/-0)

Code Example

Debug report uploaded:
  Report     https://paste.rs/P4edl
  agent.log  https://paste.rs/r5wLQ

---
RAW_BUFFERClick to expand / collapse

Bug Description

I don't know if this is a bug or just a feature as the title described.

  1. in hermes_cli/main.py line 6026: if starts normally, args.command will be None. So args.toolsets will be set to None, this makes the System prompt having no toolsets invoked even though configured. if args.command is None: args.query = None args.model = None args.provider = None args.toolsets = None args.verbose = False args.resume = None args.continue_last = None if not hasattr(args, "worktree"): args.worktree = False cmd_chat(args) return

2.When using ( https://hermes-agent.nousresearch.com/docs/user-guide/features/tools)

Use specific toolsets

hermes chat --toolsets "web,terminal" the code will execute line 6040: if hasattr(args, 'func'): args.func(args) this way the toolsets will be invoked in System prompt.

Please help to explain.

Steps to Reproduce

  1. python hermes setup and do setup
  2. run hermes_cli/main.py
  3. debugging hermes_cli/main.py line 6026
  4. the code args.toolsets = None so no toolsets will be in System prompt.

Expected Behavior

I think if toolsets configured correctly in python hermes setup, they will be added in system prompt.

Actual Behavior

no toolsets will be in System prompt.

Affected Component

CLI (interactive chat)

Messaging Platform (if gateway-related)

No response

Debug Report

Debug report uploaded:
  Report     https://paste.rs/P4edl
  agent.log  https://paste.rs/r5wLQ

Operating System

ubuntu 20.04

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

extent analysis

TL;DR

The issue can be resolved by ensuring that the args.toolsets variable is properly set when args.command is None, allowing the configured toolsets to be invoked in the System prompt.

Guidance

  • Review the hermes_cli/main.py file, specifically lines 6026-6040, to understand how args.toolsets is being set and used.
  • Verify that the --toolsets flag is being passed correctly when running the hermes chat command, and that the args.toolsets variable is being updated accordingly.
  • Consider adding a check to ensure that args.toolsets is not set to None when args.command is None, to prevent the loss of configured toolsets.
  • Investigate the hermes setup process to ensure that the toolsets are being configured correctly and that the configuration is being properly read by the hermes_cli/main.py script.

Example

if args.command is None:
    # ... existing code ...
    # Add a check to ensure args.toolsets is not set to None
    if 'toolsets' in args:
        args.toolsets = args.toolsets
    else:
        # Handle the case where toolsets are not configured
        pass
    # ... existing code ...

Notes

The exact fix will depend on the specific requirements of the hermes_cli/main.py script and the hermes setup process. Additional logging or debugging may be necessary to fully understand the issue.

Recommendation

Apply a workaround to ensure that args.toolsets is properly set when args.command is None, as this will allow the configured toolsets to be invoked in the System prompt.

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 - ✅(Solved) Fix [Bug]: when start hermes from hermes_cli/main.py, no toolsets used in system prompt even configured using 'python hermes setup' [1 pull requests, 1 participants]