Repository navigation
fix: 修复被打断 run 的悬空 tool_calls 与会话自愈(issue #304) - #335
Merged
Merged
Conversation
用真实 AgentLoop + SessionStore + AnthropicLLM 序列化路径,在工具执行中途 cancel run,再从快照恢复发起下一次请求;协议校验 fake provider 返回 400。 当前为失败测试,供后续加载/续跑自愈修复验证。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- proposal / design / tasks / spec delta(agent-runtime、observability、web-ui) - RIR full 档:Anthropic 配对协议、LangGraph/pydantic-ai/ADK/OpenAI Agents/Bernstein 对照 - 独立 grill + 设计对抗环:8 项 + 3 项 deferred 全部 verified,出口 PASS - backlog 登记第二十二批(issue #304) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- AgentLoop:run 起点持久化自愈 + finally best-effort 补配对;resume 同步状态在 set_mode await 前恢复 - 合成确定性 tool_result(固定前缀、幂等、Anthropic is_error、OpenAI Error 前缀) - tool_pairing_repaired 事件 + trace;正常链零改动 - HTTP >=400 body 附加到异常;trace/Web 展示有界 detail;群聊共享日志固定状态+错误类型枚举 - 测试:真实链路失败测试转绿,新增纯函数/恢复/中断/诊断/前端用例 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- agent-runtime / observability / web-ui delta 施加进 current specs - ADR-0009 记录 run 边界修复、合成 vs 丢弃、finally best-effort 边界 - architecture / testing-guide 补中断自愈事实 - 补 web resume、群聊超时、run-source 事件、哨兵与前缀碰撞测试 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- 空 body HTTP 错误仍携带 status_code(群聊摘要显示 HTTP <status>) - 后续无状态码 error 不清空已有 HTTP 摘要 - 补事件 id 边界、OpenAI 逐 id 配对、repair→compact、空 body 测试 - tasks 1.2.1 文件名同步 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
issue #304:run 在 assistant
tool_calls已写入、tool_result未写回之间被打断(重启 / 取消 / 群聊成员 240s 超时),消息链留下悬空tool_use;下一次请求被 Anthropic/DeepSeek 400 拒绝,会话永久不可用。改动
AgentLoop._run起点(resume 重建后)调用纯函数repair_tool_call_pairing;run()的finally第一条语句做 best-effort 补配对(不覆盖 SIGKILL/断电)。[asterwynd:synthetic-tool-result] Error:、携带原tool_call_id;幂等、正常链零改动;Anthropic 序列化is_error: true,OpenAI 用Error:文本前缀。tool_pairing_repaired事件 + trace;finally 修复同步记录source="finally"trace。set_modeawait 之前。HTTP <status>+ 已知错误类型枚举,不写error.message/原始 body。验证
TestFindScopeRoot×2、test_task_output_truncated在干净origin/master复现;test_history_redraw_drops_pending_tool_rows为本机 Playwright 计时 flake,单跑通过)。check通过(三份 manifest 已绑定)。关联
Closes #304(合入后补完成说明 comment 并关闭)。
🤖 Generated with Claude Code