hermes - 💡(How to fix) Fix Session permanently stuck after conflicting instructions, cannot recover after restarting WebUI + Gateway

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…
RAW_BUFFERClick to expand / collapse

Session 永久卡死:相悖指令导致模型死循环,且无法恢复

问题描述

向 Hermes Agent 提出一个包含相悖指令的问题后(例如"你自行操作" vs "写入文件需先征求同意"),AI 模型(DeepSeek V4 Flash)在内部推理中陷入死循环,该会话窗口永久卡死在"思考过程"状态,无法回复。

尝试过的恢复方式(全部无效)

  1. 发新消息 — 新消息在 API 端排队,无法中断旧请求
  2. 刷新浏览器页面 (F5) — 刷新后窗口仍在"思考中"
  3. 重启 Hermes WebUI (systemctl restart hermes-webui)
  4. 重启 Hermes Gateway (systemctl restart hermes-gateway)
  5. 重开浏览器标签页 — 新标签页打开同一 WebUI,该会话仍然卡死

唯一可行的恢复方式

  1. 新建一个会话窗口(可正常对话)
  2. 删除卡死的会话窗口
  3. ⚠️ 代价:该会话的历史聊天记录丢失(WebUI 页面上不可见)
  4. 但 Agent 的持久记忆(memory)不受影响

建议修复方向

  1. 新消息应能中断当前卡死的 API 请求(而不是排队等待),释放 worker 重新处理
  2. API 请求超时机制:Gateway 层为每个请求设置主动超时(如 60 秒),超时后自动释放
  3. WebUI session 活跃度检测:自动检测无响应 worker 并回收 session,而不是永久卡死

环境

  • Hermes WebUI v0.5.30
  • DeepSeek API (deepseek-v4-flash)
  • Hermes Gateway (systemd service)
  • Linux / Alibaba Cloud

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