诊断并修复 Hermes Agent 运行时无声停止、即使无需用户输入也需手动发送“continue”消息的问题。使用此技能时,...
Use this skill for one narrow failure mode: Hermes ends a turn after a short non-final work-status message instead of continuing with tool calls.
The usual root cause is control-loop classification, not machine slowness:
finish_reason=stop.Run the bundled scanner from the Hermes WSL distro:
bash
python3 <skill_dir>/scripts/scan_hermes_continuation.py --since-minutes 360 --format text
Default paths used by the scanner:
/root/.hermes/logs/agent.log/root/.hermes/state.dbThe scanner emits deterministic classifications:
continuation_candidate: likely premature stop; patch or extend tests.asks_user: valid stop; do not auto-continue.final_or_summary: valid completion or summary; do not patch.review: inspect manually before changing code.Patch only after the scanner finds concrete phrase families in recent logs. Keep the change local and regression-tested.
Known Hermes files:
/usr/local/lib/hermes-agent/agent/agent_runtime_helpers.py/usr/local/lib/hermes-agent/agent/conversation_loop.py/usr/local/lib/hermes-agent/run_agent.py/usr/local/lib/hermes-agent/tests/run_agent/test_run_agent.pyThe continuation heuristic should require all of these:
The heuristic must reject:
Run focused tests before reporting success:
bash
cd /usr/local/lib/hermes-agent
PYTHONDONTWRITEBYTECODE=1 venv/bin/python -m pytest -q \
tests/run_agent/test_run_agent.py::test_run_conversation_continues_after_nonfinal_work_status_after_tools \
tests/run_agent/test_run_agent.py::test_run_conversation_continues_after_chinese_future_action_status \
tests/run_agent/test_run_agent.py::test_run_conversation_does_not_continue_when_status_requests_user_input
PYTHONDONTWRITEBYTECODE=1 venv/bin/python -m pytest -q \
tests/run_agent/test_run_agent_codex_responses.py::test_run_conversation_codex_continues_after_ack_stop_message \
tests/run_agent/test_run_agent_codex_responses.py::test_run_conversation_codex_continues_after_ack_for_directory_listing_prompt
PYTHONDONTWRITEBYTECODE=1 venv/bin/python -m py_compile \
agent/agent_runtime_helpers.py agent/conversation_loop.py run_agent.py tests/run_agent/test_run_agent.py
Code edits do not hot-load into already-running interactive Hermes CLI processes. Tell the user to exit and reopen stale CLI sessions. Do not kill interactive Hermes CLI processes unless explicitly asked.
Gateway and Dashboard can be restarted separately if they are down, but that is a different problem from continuation stalls.
Keep the report short: