mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-20 05:01:30 +00:00
fix: stop retrying initial MCP auth failures
This commit is contained in:
parent
1dd33988e2
commit
1247ff2dca
2 changed files with 44 additions and 0 deletions
|
|
@ -1499,6 +1499,16 @@ class MCPServerTask:
|
|||
# should not permanently kill the server.
|
||||
# (Ported from Kilo Code's MCP resilience fix.)
|
||||
if not self._ready.is_set():
|
||||
if _is_auth_error(exc):
|
||||
logger.warning(
|
||||
"MCP server '%s' failed initial OAuth authentication, "
|
||||
"not retrying automatically: %s",
|
||||
self.name, exc,
|
||||
)
|
||||
self._error = exc
|
||||
self._ready.set()
|
||||
return
|
||||
|
||||
initial_retries += 1
|
||||
if initial_retries > _MAX_INITIAL_CONNECT_RETRIES:
|
||||
logger.warning(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue