Files
hermes-agent/agent
alrcatraz 6bbdc8ad80 fix(agent): hide the synthetic interrupt close from the transcript
close_interrupted_tool_sequence() appends a synthetic assistant turn when an
interrupted tail is a raw tool result, so the next user message does not land as
tool -> user. The row carried a user-visible "Operation interrupted." string and
was persisted as an ordinary assistant message, so background preemption —
session reaping, watchdogs, batch guards — surfaced in the transcript as an
interruption the user was expected to act on.

Store it in the same hidden shape turn_api_call.py already uses for interrupt
placeholders: content="" plus display_kind="hidden" keeps it out of rendered
transcripts, while the api_content sidecar carries the LLM-visible text and is
substituted at API-build time. The alternation guarantee is unchanged.

(cherry picked from commit 22502b1c40c26a08eefc3d35cee067bd1d889bfc)
2026-10-07 18:15:29 +05:30
..
2026-09-11 09:31:13 -07:00