会话上下文未触发压缩,导致模型幻觉严重
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 395
- Avg merge
- 21h 48m
- Merged PRs (30d)
- 776
Description
**提交人**: yangxinyi1
**客户端版本**: 0.1.33
---
## 环境信息
- 模型:deepseek-v4-flash(上下文窗口 200k)
- 压缩配置:50%
- 客户端:Claude Code(Cindy 模式)
- 会话 ID:d5766347-de94-431e-9d62-60bdc240f520
## 现象
会话历史达到 190k+ tokens 后,模型开始产生严重幻觉——编造不存在的对话内容、错误理解用户意图。经排查,会话全程未触发过任何上下文压缩/总结操作。
## 复现步骤
1. 在长时间对话中持续交互,使上下文增长到 150k+ tokens
2. 观察模型行为,开始出现幻觉(编造内容、错误引用)
3. 检查会话历史,确认无压缩/总结事件记录
## 实际行为
上下文从 21 tokens 线性增长到 190k+,从未回落。模型在满窗口下运行,导致早期内容被挤出窗口,模型在残缺上下文中编造结论。
## 期望行为
上下文达到 100KB 阈值时应自动触发压缩/总结,保留关键信息后释放上下文空间,确保模型始终在有效窗口内运行。
---
**版本区域**: CN
**OS**: win32 x64 (10.0.26100)
**界面语言**: zh-CN
Contributor guide
Research direction
The issue does not name any source file, test, or entry point. Start by tracing where session history size is measured and where context compression events are recorded, then verify the configured threshold and compression path. Done means long sessions trigger compression before the context window is exhausted and retain the important conversation context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ai
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100