[Bug] 对话长文本生成时陷入死循环且无法恢复,重启后报错 "Partial assistant output was discarded before a streaming retry"
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
提交前确认 · Pre-submission checklist
- 我已搜索过现有 issue,确认这不是重复 / I searched existing issues and confirmed this isn't a duplicate.
- 我已阅读 CONTRIBUTING.md / I've read CONTRIBUTING.md.
问题类别 · Category
对话 / Agent 交互 · Agent chat
涉及的 Agent 框架 · Agent framework
ZCode Agent(自研)
严重程度 · Severity
阻塞使用 · Blocking (无法使用核心功能 / core function unusable)
复现频率 · Reproducibility
偶现 · Sometimes
问题描述 · Description
在进行长代码/长文本(如全量重写某个核心代码文件)生成时,AI 陷入思考与流式输出的死循环,界面一直显示正在发送/生成请求且完全不会恢复。
当强制重启客户端后,由于本地对话状态加载异常,直接抛出流式重试报错:
"Partial assistant output was discarded before a streaming retry. TraceID: hydrate-trace"
复现步骤 · Steps to reproduce
- 打开 ZCode,进入包含较长上下文或大文件的项目。
- 输入提示词要求对大文件进行全量生成/重构(例如:全量重写 cfg_store.py)。
- AI 开始思考(Thinking)并进入多轮流式生成与“继续”的递归状态。
- 客户端陷入无限请求/等待状态,停止响应新操作且完全无法恢复。
- 强制关闭并重启 ZCode,重新打开该会话。
- 界面提示:
Partial assistant output was discarded before a streaming retry. TraceID: hydrate-trace。
期望表现 · Expected behavior
- 长文本或深度思考遇到超时/Token上限时,应正常捕获并终止,给出明确的截断或超时提示,而不是陷入持续发送请求的假死状态。
实际表现 · Actual behavior
- 遇到复杂长任务时持续处于发送状态,前端无法自行恢复。中止后下次对话仍有问题
- 重启应用后,状态水合失败,报错:
报错摘要: Partial assistant output was discarded before a streaming retry.
TraceID: hydrate-trace
ZCode 版本 · ZCode version
v3.11.2
设备 / 系统 / 浏览器 · Device / OS / Browser
Windows11 25H2 26200.9168
截图 / 录屏 / 日志 · Screenshots / Recordings / Logs
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or tests are named. Start by reproducing the long-text generation loop, then trace the streaming retry flow and local conversation-state hydration after restart. Done means long requests terminate with a clear timeout or truncation message and the conversation reloads without the reported error.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100