hermes - ✅(Solved) Fix [Bug]: Open WebUI doesn't remember tool calls, causing erratic assistant behaviour [2 pull requests, 2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#14270Fetched 2026-04-23 07:45:54
View on GitHub
Comments
2
Participants
2
Timeline
8
Reactions
0
Author
Participants
Timeline (top)
labeled ×3commented ×2cross-referenced ×2referenced ×1

Error Message

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Fix Action

Fixed

PR fix notes

PR #14316: fix: preserve proxy tool call history for Open WebUI sessions

Description (problem / solution / changelog)

Summary

  • preserve assistant tool-call turns and tool result messages when gateway proxy mode forwards local history
  • keep filtering out session metadata and system history, but stop collapsing proxy history to text-only turns
  • update proxy-mode regression coverage to assert tool continuity is preserved

Fixes #14270

Testing

  • python3 -m pytest -o addopts='' tests/gateway/test_proxy_mode.py

Changed files

  • gateway/run.py (modified, +24/-4)
  • tests/gateway/test_proxy_mode.py (modified, +8/-6)

PR #3: fix: preserve tool-turn context in chat/completions (#14270)

Description (problem / solution / changelog)

결론

Open WebUI 계열 클라이언트에서 도구 호출 맥락이 다음 턴에 소실되는 문제(#14270)를 chat/completions 경로에서 재현 테스트 후 수정했습니다.

원인

  • /v1/chat/completions 파서가 user/assistant만 conversation_history에 포함하고 tool role은 버렸습니다.
  • 또한 마지막 메시지를 무조건 user_message로 간주해, 일부 클라이언트에서 trailing tool/assistant 턴이 섞일 때 입력 추출이 불안정했습니다.
  • assistant tool-call 턴이 content: "" + tool_calls 형태로 전달되면, 이전 턴에 도구를 불렀다는 힌트가 완전히 사라졌습니다.

수정 내용

  1. tool role 메시지를 conversation_history에 포함
  2. assistant 턴이 empty content + tool_calls인 경우, 툴 이름 기반 marker를 history에 보존
    • 예: [assistant issued tool calls: read_file]
  3. user_message 추출을 "마지막 메시지"가 아닌 "마지막 유효 user 턴" 기준으로 변경

테스트

  • test_tool_messages_and_assistant_tool_calls_are_preserved
  • test_last_user_message_selected_when_trailing_tool_message_exists
  • 기존 test_conversation_history_passed 회귀 포함

실행:

  • scripts/run_tests.sh tests/gateway/test_api_server.py::TestChatCompletionsEndpoint

결과:

  • 17 passed

연계 이슈

  • Closes #14270
  • #14238, #14210 은 별도 패치로 이어서 진행 예정 (레이스/FD 누수 성격으로 범위가 큼)

Changed files

  • agent/error_classifier.py (modified, +24/-13)
  • gateway/platforms/api_server.py (modified, +37/-5)
  • run_agent.py (modified, +1/-1)
  • tests/agent/test_error_classifier.py (modified, +23/-0)
  • tests/gateway/test_api_server.py (modified, +69/-0)
  • tests/run_agent/test_run_agent.py (modified, +20/-0)
  • tests/tools/test_registry.py (modified, +24/-0)
  • tests/tools/test_todo_tool.py (modified, +23/-0)
  • tools/registry.py (modified, +43/-1)
  • tools/todo_tool.py (modified, +16/-2)

Code Example

irrelevant

---
RAW_BUFFERClick to expand / collapse

Bug Description

Open WebUI conversations with tools calls don't seem to actually remember having called a tool.

User: Make edit X to file Y AI: I have updated the file User: Print out exactly what you added to the file AI: I don't actually have a prior read of the file in this session — my earlier response was fabricated. I haven't touched the file at all. Apologies. Let me do this properly now. [...] Oh, this is already in the file. My earlier response was wrong — I implied it wasn't there and that I was adding it. It was already present. Apologies for the confusion.

I appreciate that there were recent changes to remove tool calls from being shown in Open WebUI, but now the agent doesn't remember things between two turns in the same conversation, which makes it unusable.

Worst case here is that the assistant repeatedly performs operations, which is dangerous and makes things very unreliable.

Steps to Reproduce

Reference any prior conversation point that included a tool call.

Expected Behavior

Tool calls should be persisted in the conversation somehow.

Actual Behavior

AI gets confused an erratic.

Affected Component

Gateway (Telegram/Discord/Slack/WhatsApp)

Messaging Platform (if gateway-related)

N/A (CLI only)

Debug Report

irrelevant

Operating System

Debian 13

Python Version

Python 3.13.5

Hermes Version

Hermes Agent v0.10.0 (2026.4.16)

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

extent analysis

TL;DR

The issue can be addressed by modifying the conversation persistence mechanism to store tool calls, allowing the AI to remember previous actions within a conversation.

Guidance

  • Review the recent changes that removed tool calls from being shown in Open WebUI to understand the impact on conversation persistence.
  • Investigate the conversation storage mechanism to determine how to persist tool calls, ensuring the AI can recall previous actions.
  • Consider adding a feature to store conversation history, including tool calls, to improve the AI's ability to remember and build upon previous interactions.
  • Evaluate the potential risks of the current behavior, such as repeated operations, and prioritize a solution to prevent these issues.

Example

No code snippet is provided due to the lack of specific implementation details in the issue.

Notes

The solution may require modifications to the Hermes Agent or the conversation persistence mechanism, and thorough testing will be necessary to ensure the fix does not introduce new issues.

Recommendation

Apply a workaround to modify the conversation persistence mechanism to store tool calls, as this is a critical issue that affects the reliability and safety of the AI's interactions.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix [Bug]: Open WebUI doesn't remember tool calls, causing erratic assistant behaviour [2 pull requests, 2 comments, 2 participants]