NousResearch/hermes-agent · error · RuntimeError
agent reported failure
Error message
agent reported failure
What it means
Error "agent reported failure" thrown in NousResearch/hermes-agent.
Source
Thrown at cron/scheduler.py:4548
# on these paths and may put the error into `final_response`, which
# would otherwise be delivered as if it were the agent's reply and the
# job's `last_status` set to "ok". Raise so the except handler below
# builds the proper failure tuple. (issue #17855)
turn_exit_reason = str(result.get("turn_exit_reason") or "")
final_response_text = (result.get("final_response") or "").strip()
max_iteration_summary = (
result.get("failed") is not True
and result.get("completed") is False
and turn_exit_reason.startswith("max_iterations_reached(")
and bool(final_response_text)
)
if result.get("failed") is True or (result.get("completed") is False and not max_iteration_summary):
_err_text = (
result.get("error")
or final_response_text
or "agent reported failure"
)
raise RuntimeError(_err_text)
if max_iteration_summary:
logger.warning(
"Job '%s' reached the iteration limit but produced a final fallback response; "
"delivering the response instead of failing the cron run",
job_name,
)
final_response = result.get("final_response", "") or ""
# Strip leaked placeholder text that upstream may inject on empty completions.
if final_response.strip() == "(No response generated)":
final_response = ""
# Cron silence on abnormal empty turns. The turn-completion explainer
# (#34452) replaces a blank/empty model turn with a "⚠️ No reply: …"
# string so interactive surfaces (CLI/gateway) explain why the box is
# empty. In a cron context that turns a previously-silent empty turn
# into a delivered warning (Manfredi's Telegram symptom). Detect the
# explainer text deterministically (via the same formatter that
# produced it) and treat it as empty so the empty-response suppressionView on GitHub (pinned to c896c09c42)
Solutions
- Check the job's session/logs for the agent's reported failure reason.
- Fix the underlying prompt/tool/provider issue and rerun the job.
When it happens
Trigger: Thrown at cron/scheduler.py:4548 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of NousResearch/hermes-agent@c896c09c42 (2026-08-14).
Data as JSON: /api/errors/1516fb5f5ac604d0.
Report an issue: GitHub.