hermes - 💡(How to fix) Fix [Bug] Context compression silently drops summary on connection error, causing total context loss for long tasks [1 pull requests]

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…

Error Message

  1. 在压缩时刻恰好遇到网络波动(Connection error) 2026-05-21 09:06:49 root: Failed to generate context summary: Connection error.. Further summary attempts paused for 30 seconds.

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

问题描述

当上下文压缩(context compression)触发时,如果摘要生成(summary generation)因网络连接错误失败,Hermes 会静默地丢弃所有被压缩的消息,不保留任何摘要。这导致长时间任务的关键上下文完全丢失,用户不得不从头再来。

复现步骤

1. 进行一个涉及多轮工具调用的长时间任务(如浏览器自动化 + 多步分析)
2. 等待上下文接近模型 token 上限,触发自动压缩
3. 在压缩时刻恰好遇到网络波动(Connection error)

实际行为

日志显示:

2026-05-21 09:06:47 agent.conversation_compression: context compression started: messages=124 tokens=~100,157
2026-05-21 09:06:49 root: Failed to generate context summary: Connection error.. Further summary attempts paused for 30 seconds.
2026-05-21 09:06:49 agent.conversation_compression: context compression done: messages=124->15 tokens=~28,865


124 条消息被压缩到 15 条,110 条消息被删除且没有任何摘要。压缩提示只显示 "Summary generation was unavailable"。

期望行为

- 摘要生成失败时应该重试(至少 1-2 次),而不是立即放弃
- 如果重试也失败,应该保留更多近期消息(而不是激进地一刀切)
- 压缩后应向用户发出明确的警告,而不是静默丢弃

影响

这对长时间任务(如多步浏览器自动化、代码重构、数据分析)是灾难性的:
- 所有的中间状态、工具调用结果、用户指令全部丢失
- Agent "失忆"后可能重复之前的工作或做出错误的假设
- 用户不得不从头描述需求,严重破坏工作连续性

环境信息

- Hermes Agent: v2026.5.16
- 模型: GLM-5.1 (智谱 Coding Plan)
- 运行平台: macOS

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