NousResearch/hermes-agent · error · GatewayLifecycleBlocked
Blocked: cron job contains a gateway lifecycle command or pe
Error message
Blocked: cron job contains a gateway lifecycle command or persistent launchctl submit operation. This is blocked to prevent agent-driven SIGTERM-respawn loops under launchd/systemd supervision (#30719). Run `hermes gateway restart` from a shell outside the running gateway instead.
What it means
Error "Blocked: cron job contains a gateway lifecycle command or persistent launchctl submit operation. This is blocked to prevent agent-driven SIGTERM-respawn loops under launchd/systemd supervision (#30719). Run `hermes gateway restart` from a shell outside the running gateway instead." thrown in NousResearch/hermes-agent.
Source
Thrown at cron/lifecycle_guard.py:708
if python_script:
# Python is executed by the interpreter, never through a POSIX
# shell: the shell-script reference walk is a false-positive
# generator on Python sources (pathlib's "/" operator resolves to
# the filesystem root and trips the regular-file check, blocking
# every innocent .py cron script, #77131). The direct command
# regex below still scans the full text, so a literal
# `hermes gateway restart` embedded in a .py script is still
# blocked. Non-regular/oversized script files still fail closed
# via the lifecycle-shaped sentinel in _read_script_for_scanning.
unsafe = _lifecycle_command_scan_with_data_exemption(combined)
else:
script_dir = _resolve_script_directory(script) if script else None
unsafe = contains_gateway_lifecycle_command_or_referenced_script(
combined,
cwd=script_dir,
)
if unsafe:
raise GatewayLifecycleBlocked(
"Blocked: cron job contains a gateway lifecycle command or persistent "
"launchctl submit operation. This is blocked to prevent agent-driven "
"SIGTERM-respawn loops under launchd/systemd supervision "
"(#30719). Run `hermes gateway restart` from a shell outside "
"the running gateway instead."
)
View on GitHub (pinned to c896c09c42)
Solutions
- Run `hermes gateway restart` from a shell outside the running gateway.
- Remove the gateway lifecycle/launchctl command from the cron job.
When it happens
Trigger: Thrown at cron/lifecycle_guard.py:708 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/60d4d9d719e8875f.
Report an issue: GitHub.