Files
hermes-agent/tests/tools
Teknium ba73118c61 fix(mcp): correlate a folded tools/call 401 by request, and keep app-token servers out of sign-in
A 401 that the OAuth flow answered by refreshing and resending the same request
stayed queued. When the resent request then failed with a 500, the handler
claimed that 401, ran OAuth recovery and retried the call with no side-effect
guard, so a write tool could run twice. The response hook now records each
tools/call response by JSON-RPC id into the sending handler's own table (mcp
2.x runs each POST in a copy of the sender's context). The last leg for an id
wins, so a recovered 401 never marks the call. This also removes the
same-tool concurrency gap: a concurrent call of the same tool writes into its
own table.

A plugin server whose bearer its app publishes at connect time (server_json
liveness) has no `headers` in config and looked anonymous. A stale app token
got the "requires sign-in, run hermes mcp login" message, and `hermes mcp
login` would have switched the entry to OAuth. Its 401 now asks for an app
restart or reconnect, and login refuses to adopt OAuth for it.
2026-12-01 14:10:08 -08:00
..