Repository navigation
Description
Bug Description
When Hermes is configured to use GitHub Copilot ACP with the long-context flag (via .env: HERMES_COPILOT_ACP_ARGS=--acp --stdio --context long_context), the agent frequently fails to execute tool calls. The model outputs tool-like XML in a form Hermes doesn't parse (e.g. Claude's native <tool_use> tags), the terminal hides those tags, and Hermes never executes the tool. The model then continues with confident reasoning as if the tool had run, producing hallucinated results.
Steps to Reproduce
- In
C:\\Users\\ar271\\AppData\\Local\\hermes\\.envset:HERMES_COPILOT_ACP_ARGS=--acp --stdio --context long_context - Start Hermes:
hermes - Ask the agent to perform an action that triggers a tool (for example: install a repo, read a README, or run a terminal tool)
- Observe the agent output: it enters a long reasoning block, shows text fragments with missing spaces where an XML tool tag was present, and never executes the requested tool. No tool calls or tool outputs are produced.
- Reverting .env to remove
--context long_contextreturns normal tool-calling behavior.
Expected Behavior
The agent should detect and execute tool calls emitted by the model (regardless of whether they use Hermes' <tool_call> XML or Claude's native <tool_use> format). When using the Copilot ACP long_context tier, Hermes should either:
(A) instruct the CLI/model to output Hermes-compatible tool calls,
(B) parse and accept native <tool_use> tags,
or
(C) disable the Copilot "reasoning" wrapper for sessions that require tool execution.
Actual Behavior
Agent never executes the tool. The terminal output contains squished sentences (where the hidden tag was rendered), e.g. "Let me check both simultaneously. Let me read the README...". The agent proceeds as if the tool executed (hallucinated results), but no tool call was fired. Example transcript and UI capture included in debug report.
Affected Component
Tools (terminal, file ops, web, code execution, etc.), Agent Core (conversation loop, context compression, memory), Configuration (config.yaml, .env, hermes setup)
Messaging Platform (if gateway-related)
N/A (CLI only)
Debug Report
Report https://paste.rs/6Do1r
agent.log https://paste.rs/HAbf0
gateway.log https://paste.rs/elTP6
desktop.log https://paste.rs/TzuhEOperating System
Windows_NT x64 10.0.26200
Python Version
3.14.3
Hermes Version
Hermes Agent v0.16.0 (2026.6.5) · upstream d62979a
Project: C:\Users\ar271\AppData\Local\hermes\hermes-agent
Python: 3.11.15
OpenAI SDK: 2.24.0
Additional Logs / Traceback (optional)
I can provide additional logs if helpful; the debug report links above contain the full agent.log and gateway logs.Root Cause Analysis (optional)
When Copilot ACP is invoked with --context long_context, the CLI routes the session to the 1m model tier. Those model variants appear to prefer or emit their native tool tags (<tool_use>) and/or emit tool calls inside a "reasoning" block. Hermes currently only scans for its injected <tool_call> format and does not parse <tool_use>, nor does it extract tool calls from reasoning traces. As a result, the model's tool output is never executed, and the model hallucinates results.
Proposed Fix (optional)
Short-term: Update the copilot_acp_client's parser to recognize Claude's native **<tool_use>** tags (and/or extract tool calls from the reasoning block) so tool execution still happens when using long_context.
Long-term: Update the ACP integration to either (A) request the model use Hermes' expected tool format explicitly in the system prompt for long_context sessions, (B) switch to structured JSON tool calling when available, or (C) add a copilot flag that disables the "reasoning" wrapper for tool-heavy sessions.
Workarounds: remove --context long_context from HERMES_COPILOT_ACP_ARGS or set --effort low to disable the thinking wrapper.
Are you willing to submit a PR for this?
- I'd like to fix this myself and submit a PR
Activity
GottZ commentedon Aug 3, 2026
Summary
Eight PRs were triaged, but only #45231 and the bundled copy in #45350 modify the Copilot ACP parser for the failure reported in #45139; both add
<tool_use>extraction, while the other six diffs address cron, slash-command, dashboard-status, or session-continuity behavior rather than the ACP tool-call cause. #45231 is the best existing fix, but its parser is only partial because it emits the wrong call-object type and permits non-JSON arguments that the execution path rejects.Related pull requests
unrelated— (+310/-0) — unrelated: Changes global--profilepreprocessing for cron create/add/edit and adds cron-specific regression tests; it does not touchagent/copilot_acp_client.pyor ACP tool-call extraction. Although closed, it remains relevant only as evidence that this PR list contains a separate cron-profile cluster.unrelated— (+125/-10) — unrelated: Adds slash-worker auto-approval and unkeyed dashboard status caching, with no Copilot ACP parser change. The visible keep_open verdict concerns salvage of those separate features—and specifically requires profile-scoped caching and revalidation of destructive-command routing—not [Bug]: Tool execution fails silently with Copilot ACP --context long_context (Claude outputs <tool_use>) #45139.best fix— (+219/-14) — partial fix / best existing fix: Adds parsing for self-closing and paired<tool_use>forms, directly targeting the reported ACP output, but constructsSimpleNamespacecalls instead of current main's_build_openai_tool_call()contract and accepts raw non-JSON arguments rejected byagent/conversation_loop.py:4531-4549. Consistent with the visible keep_open verdict, the salvageable part is the ACP parser plus tests; the slash-worker, status-cache, and polling changes should be split out.partial— (+288/-15) — partial duplicate: Although titled as a cron-profile change, its bundledagent/copilot_acp_client.pyand ACP tests reproduce the same<tool_use>parser from fix(acp): parse <tool_use> XML tags from Copilot ACP long_context mode #45231, including the same call-shape and non-JSON argument defects. This closed PR remains relevant as a duplicate source; despite its visible APPROVED review, the diff is not an independent [Bug]: Tool execution fails silently with Copilot ACP --context long_context (Claude outputs <tool_use>) #45139 solution and bundles unrelated cron, slash-worker, and dashboard changes.hermes cron edit --profile <name>now sets job profile field #45451unrelated— (+364/-15) — unrelated: Persists a cron jobprofilefield and changes CLI/pre-parser behavior, but adds no ACP parsing. Its visible keep_open verdict reports no salvageability under the intentional per-profile cron model, so it provides no path for [Bug]: Tool execution fails silently with Copilot ACP --context long_context (Claude outputs <tool_use>) #45139.unrelated— (+590/-66) — unrelated: Implements reusable or targeted cron execution sessions, ownership checks, serialization, CLI/API fields, and documentation; it does not alter Copilot ACP response parsing. The contributor keep_open review and subsequent repairs concern cron authorization and concurrent transcript writers, not the tool-call failure in [Bug]: Tool execution fails silently with Copilot ACP --context long_context (Claude outputs <tool_use>) #45139.unrelated— (+227/-2) — unrelated: Exposes per-job cron model/provider pins through the CLI and documentation, without touching ACP extraction. Although closed, it remains relevant only as a merged-elsewhere reference: the discussion states that feat(cron): user-owned model pins + cron.model fleet default #73532 implemented its CLI-flag work on main.unverified— (+525/-19) — unrelated: Fixes cronedit --profilehandling and also bundles one-shot retention and command-guard changes, but contains noagent/copilot_acp_client.pychange. It addresses [Bug]hermes cron edit <id> --profile <name>returns "Job not found" for existing jobs #32045/hermes cron edit --profile <name> returns "Job not found" for all jobs #45335 rather than the<tool_use>parsing cause of [Bug]: Tool execution fails silently with Copilot ACP --context long_context (Claude outputs <tool_use>) #45139.Duplicates
For #45139, #45350 contains substantially the same ACP
<tool_use>parser and tests as #45231; treat that portion as a duplicate of #45231. The remaining PRs are not duplicates of the ACP fix, although #32059, #45350, #45451, and #77404 form a separate cron-profile cluster.Suggested consolidation
Keep #45231 open with a salvage path as the best existing fix: split it down to the Copilot ACP parser and focused tests, port extracted calls through
_build_openai_tool_call(), require normalized JSON-object arguments, and add a fixture from the reported long-context output plus an end-to-end assertion that the call reaches execution. This follows the visible keep_open verdict rather than proposing a merge. Treat the already-closed #45350 ACP hunk as a duplicate of #45231, and exclude #32059, #44918, #45451, #60330, #63381, and #77404 from the #45139 fix set because their diffs do not address ACP<tool_use>extraction.Complex graph
flowchart TD classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937 classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151 classDef best stroke-width:3px,stroke:#b45309 classDef target stroke-width:3px,stroke:#4338ca I32045(["issue #32045 (open)"]) I32046(["issue #32046 (open)"]) I45139(["issue #45139 (open)"]) I45335(["issue #45335 (open)"]) P77404["PR #77404 (open)"] subgraph Dup32059 ["PRs duplicating each other"] P32059["PR #32059 (closed)"] P45451["PR #45451 (open)"] end subgraph Dup44918 ["PRs duplicating each other"] P44918["PR #44918 (open)"] P45231["PR #45231 (open)"] P45350["PR #45350 (closed)"] end P45231 -->|best fix| I45139 P45350 -.->|partial| I45139 P77404 -.->|unverified| I45139 P32059 -->|best fix| I32045 P45451 -->|best fix| I32045 P77404 -->|fixes| I32045 P32059 -->|best fix| I32046 P45451 -.->|partial| I32046 P32059 -->|best fix| I45335 P45451 -->|best fix| I45335 P77404 -->|fixes| I45335 class I32045 open class I32046 open class I45139 open class I45335 open class I45139 target class P32059 closed class P44918 open class P45231 open class P45350 closed class P45451 open class P77404 open class P32059 best class P32059 best class P32059 best class P45231 best class P45451 best class P45451 best click I32045 "https://github.com/NousResearch/hermes-agent/issues/32045" click I32046 "https://github.com/NousResearch/hermes-agent/issues/32046" click I45139 "https://github.com/NousResearch/hermes-agent/issues/45139" click I45335 "https://github.com/NousResearch/hermes-agent/issues/45335" click P32059 "https://github.com/NousResearch/hermes-agent/pull/32059" click P44918 "https://github.com/NousResearch/hermes-agent/pull/44918" click P45231 "https://github.com/NousResearch/hermes-agent/pull/45231" click P45350 "https://github.com/NousResearch/hermes-agent/pull/45350" click P45451 "https://github.com/NousResearch/hermes-agent/pull/45451" click P77404 "https://github.com/NousResearch/hermes-agent/pull/77404"Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed (state tag in the node label).
Cross-PR triage: Reviewed 8 pull requests and 4 issues in this complex. Each diff was read against this issue; Assessment working set: 189 kB of PR diffs, 37 kB of issue/PR text, 22 kB of discussion (28 comments), 16 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch.