Skip to content

guardrail_halt exits silently — no final assistant message delivered to client #30770

@dominicelayda

Description

@dominicelayda

Describe the bug

When the tool loop guardrail fires (, , or ), the turn exits immediately with and no final assistant message is emitted to the client. From the user's perspective — especially through API/SSE clients like Open WebUI — the conversation just goes silent with no explanation.

Reproduction

  1. Send a prompt that causes the agent to use a tool that will repeatedly fail (e.g. "write two pytest cases and run them" in an environment without pytest installed)
  2. The agent hits after N consecutive failures
  3. The SSE stream closes — no final message is delivered to the client

Log evidence

suggests the guardrail message is written to internal conversation history but not emitted as an SSE chunk to the client.

Expected behaviour

On , Hermes should inject a final assistant text message before closing the stream — summarising what was completed and why it stopped. Example:

Stopped after 4 consecutive terminal failures (pytest not installed in this environment). The function was written successfully but the tests could not be verified. You may want to install pytest or run the tests manually.

Actual behaviour

Client receives an abrupt stream end with no message. Indistinguishable from a crash.

Environment

  • Hermes gateway via → Open WebUI (SSE client)
  • Also reproduced in TUI (CLI) — confirmed to be a Hermes issue, not a client rendering issue
  • Platform:
  • Guardrail type: (count=4)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High — major feature broken, no workaroundcomp/agentCore agent loop, run_agent.py, prompt buildercomp/gatewayGateway runner, session dispatch, deliverytype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions