hermes - 💡(How to fix) Fix Subagent tool delegation inconsistent — file/terminal tools missing for children despite toolsets parameter [1 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…

When spawning subagents via delegate_task with toolsets=['file', 'terminal'], the child agents sometimes report "Tool read_file does not exists" / "Tool terminal does not exists" despite the toolsets parameter being correctly set. The behavior depends on the parent agent's context and model.

Error Message

Tool read_file does not exists.
Tool terminal does not exists.
Tool search_files does not exists.
Tool write_file does not exists.

Root Cause

Root cause hypothesis

Fix Action

Fixed

Code Example

Tool read_file does not exists.
Tool terminal does not exists.
Tool search_files does not exists.
Tool write_file does not exists.
RAW_BUFFERClick to expand / collapse

Bug: Subagent tool delegation inconsistent

Summary

When spawning subagents via delegate_task with toolsets=['file', 'terminal'], the child agents sometimes report "Tool read_file does not exists" / "Tool terminal does not exists" despite the toolsets parameter being correctly set. The behavior depends on the parent agent's context and model.

Observations

ContextParent ModelSubagent ModelOutcomeCount
User-initiated session (Telegram/CLI)qwen3.6-plus (Blaze)qwen3.6-plus (Blaze)✅ Tools work~5/5
User-initiated session (Telegram/CLI)qwen3.6-plus (Blaze)qwen3.6-plus (Blaze)❌ "Tool read_file does not exists"~1/5
Cron jobdeepseek-v4-flashqwen3.6-plus (Blaze, per delegation config)❌ Always fails8/8 across 3 runs

Error message

Tool read_file does not exists.
Tool terminal does not exists.
Tool search_files does not exists.
Tool write_file does not exists.

Reproduction steps

  1. Create a cron job (or any session where parent runs on DeepSeek)
  2. In the cron job, call delegate_task with toolsets=['terminal', 'file']
  3. The subagent reports that read_file, terminal, search_files, write_file don't exist

Root cause hypothesis

From the delegate_tool.py docs:

"Explicit child toolsets are intersected with the parent's toolsets (must not gain tools the parent lacks)."

If the intersection logic strips file/terminal tools when the parent (DeepSeek in cron context) doesn't advertise those toolset capabilities, the child never gets them regardless of the toolsets parameter or the delegation.default_toolsets config.

The inconsistency in user sessions (~80% success rate) suggests a race condition or caching issue — possibly related to the _last_resolved_tool_names save point noted in the code:

"Save parent tool names BEFORE building children (because _build_child_agent calls AIAgent() which overwrites model_tools._last_resolved_tool_names)."

Expected behavior

When toolsets=['file', 'terminal'] is explicitly passed to delegate_task, the child agent should reliably have read_file, search_files, write_file, and terminal tools available, regardless of the parent agent's model or runtime context.

Environment

  • Hermes Agent version: current main branch
  • Config: delegation.default_toolsets: ['terminal', 'file', 'web']
  • Subagent model: custom provider Blaze (qwen3.6-plus at blazeai.boxu.dev)
  • Deployment: local Linux server, Telegram gateway + cron scheduler

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…

FAQ

Expected behavior

When toolsets=['file', 'terminal'] is explicitly passed to delegate_task, the child agent should reliably have read_file, search_files, write_file, and terminal tools available, regardless of the parent agent's model or runtime context.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING