hermes - ✅(Solved) Fix ACP: implement ping method or silence Method not found error [2 pull requests, 1 comments, 2 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#12529Fetched 2026-04-20 12:18:43
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Author
Participants
Timeline (top)
referenced ×3cross-referenced ×2closed ×1commented ×1

When Hermes runs in ACP mode (hermes acp), sending a JSON-RPC ping request causes a Method not found error and a noisy stderr traceback every 60 seconds:

[ERROR] root: Background task failed
Traceback (most recent call last):
    raise RequestError.method_not_found(method)
acp.exceptions.RequestError: Method not found

Error Message

[ERROR] root: Background task failed Traceback (most recent call last): raise RequestError.method_not_found(method) acp.exceptions.RequestError: Method not found

Root Cause

When Hermes runs in ACP mode (hermes acp), sending a JSON-RPC ping request causes a Method not found error and a noisy stderr traceback every 60 seconds:

[ERROR] root: Background task failed
Traceback (most recent call last):
    raise RequestError.method_not_found(method)
acp.exceptions.RequestError: Method not found

Fix Action

Fixed

PR fix notes

PR #12823: fix(acp): implement ext_method to handle ping gracefully

Description (problem / solution / changelog)

What changed

The ACP adapter server now overrides ext_method() to return an empty dict ({}) for unknown ACP extension methods (e.g., ping), instead of raising method_not_found errors that produce noisy tracebacks in logs.

Before: Unknown extension methods like ping caused method_not_found errors and stack traces in the agent logs during ACP sessions.

After: Unknown extension methods are handled gracefully by returning an empty response, preventing log noise and allowing ACP sessions to proceed normally.

How to test

  1. Start an ACP session with a server that sends ping extension methods
  2. Verify no method_not_found errors appear in logs
  3. Run the test suite:
    pytest tests/acp/test_ext_method.py -v

Platforms tested

  • Linux (Docker container, Python 3.11)

Closes #12529

Changed files

  • acp_adapter/server.py (modified, +10/-0)
  • tests/acp/test_ext_method.py (added, +37/-0)

PR #12855: fix(acp): silence log noise from liveness-probe requests

Description (problem / solution / changelog)

Summary

ACP clients that send periodic bare ping JSON-RPC requests no longer produce per-probe Background task failed tracebacks in the Hermes ACP server's stderr.

Root cause: the acp router correctly returns JSON-RPC -32601 Method not found to the caller — which clients like acp-bridge already treat as 'agent alive' — but the supervisor task that dispatched the request then re-raises the RequestError through Connection._on_task_error, which calls logging.exception('Background task failed', ...). That's where the traceback came from, not from the JSON-RPC layer.

Changes

  • acp_adapter/entry.py: new _BenignProbeMethodFilter attached to the stderr handler. It suppresses log records only when all of: (a) message is Background task failed, (b) exception is an acp.RequestError, (c) code is -32601, (d) data['method'] is one of {ping, health, healthcheck}. Everything else passes through.
  • tests/acp/test_ping_suppression.py: 8 unit tests covering every filter branch + 1 end-to-end test that drives a bare ping through acp.run_agent over real asyncio pipes and asserts both (a) the client receives the proper -32601 response and (b) stderr stays clean.

Why not implement ext_method (as in #12823)

The acp router only dispatches to ext_method when the JSON-RPC method name starts with _ (see acp/router.py:164). Clients including acp-bridge (src/acp_client.py:267) send a bare "ping" with no prefix, which falls through to routes.get("ping") -> None -> method_not_found — never reaching ext_method. Verified by E2E replay through the real acp stack before writing the fix.

Validation

BeforeAfter
Client response to bare ping-32601 Method not found-32601 Method not found (unchanged)
Stderr per probemulti-line tracebacksilent
Real method-not-found for non-probe methodsloggedlogged (unchanged)
Other Background task failed exceptionsloggedlogged (unchanged)

9/9 tests in tests/acp/test_ping_suppression.py pass. tests/acp/test_entry.py still passes.

Closes #12529

Changed files

  • acp_adapter/entry.py (modified, +41/-0)
  • tests/acp/test_ping_suppression.py (added, +210/-0)

Code Example

[ERROR] root: Background task failed
Traceback (most recent call last):
    raise RequestError.method_not_found(method)
acp.exceptions.RequestError: Method not found

---

# Start hermes in ACP mode
hermes acp

# In another terminal, send a ping via stdin:
echo '{"jsonrpc":"2.0","id":1,"method":"ping","params":{}}' | hermes acp
# stderr shows: [ERROR] root: Background task failed + traceback
RAW_BUFFERClick to expand / collapse

Summary

When Hermes runs in ACP mode (hermes acp), sending a JSON-RPC ping request causes a Method not found error and a noisy stderr traceback every 60 seconds:

[ERROR] root: Background task failed
Traceback (most recent call last):
    raise RequestError.method_not_found(method)
acp.exceptions.RequestError: Method not found

Context

ACP clients (editors, gateways like ACP Bridge) send periodic ping requests to check if the agent process is still alive. This is a standard health-check pattern — the client only cares whether the process responds, not whether the method is implemented.

Kiro CLI and Claude Code both handle ping gracefully (either implement it or return a silent error). Hermes returns -32601 which is fine per JSON-RPC spec, but the stderr traceback is unnecessary noise.

Reproduction

# Start hermes in ACP mode
hermes acp

# In another terminal, send a ping via stdin:
echo '{"jsonrpc":"2.0","id":1,"method":"ping","params":{}}' | hermes acp
# stderr shows: [ERROR] root: Background task failed + traceback

Suggestion

Either:

  1. Implement ping — return {"jsonrpc":"2.0","id":1,"result":{}} (preferred, trivial)
  2. Silence the traceback — return the -32601 error response without logging a full traceback to stderr for unknown methods

Option 1 is ideal since ping is becoming a de facto convention across ACP agents.

Environment

  • Hermes Agent v0.9.0
  • ACP Bridge v0.15.10
  • Python 3.11

extent analysis

TL;DR

Implementing the ping method in Hermes or silencing the traceback for unknown methods can resolve the Method not found error and noisy stderr traceback.

Guidance

  • To implement the ping method, return a JSON-RPC response with an empty result, e.g., {"jsonrpc":"2.0","id":1,"result":{}}.
  • To silence the traceback, modify the error handling for unknown methods to return the -32601 error response without logging a full traceback to stderr.
  • Verify the fix by sending a ping request to Hermes in ACP mode and checking for the absence of the Method not found error and stderr traceback.
  • Consider implementing the ping method as it is becoming a de facto convention across ACP agents.

Example

# Example implementation of the ping method
def ping(params):
    return {}

# Example error handling to silence the traceback
def handle_unknown_method(method):
    return {"jsonrpc": "2.0", "id": 1, "error": {"code": -32601, "message": "Method not found"}}

Notes

The solution assumes that the ping method is not already implemented in Hermes and that silencing the traceback is a viable alternative. The choice between implementing the ping method and silencing the traceback depends on the specific requirements of the ACP agent and its clients.

Recommendation

Apply workaround by implementing the ping method, as it is a simple and preferred solution that aligns with the emerging convention across ACP agents.

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