fix(runtime): prune and persist the tool DeferralTracker
维护者通常 1 天内回复
@aheritier 已经在做这个了。
开始于 2026年10月21日。
评估
这个 Issue 还没有评估数据。
描述
Problem
The runtime's DeferralTracker (runtime.go) keeps per-session state about which tools were present on a session's first call. Entries are never removed; only native compaction resets a session. In long-lived processes (serve api, serve a2a, serve mcp) the map grows with every session ever served.
The state is also not persisted. After a session is reloaded in a new process, its baseline resets, deferred tools can be sent inline again, and the tool prefix changes. That breaks the prompt cache, and on Claude 5.x models that check thinking prefixes, it invalidates replayed thinking.
Proposal
- Drop a session's entry when the session ends or is evicted.
- Decide whether the baseline should be persisted with the session or rebuilt from history on reload, so a reloaded session sends the same tools in the same order.
Acceptance criteria
- The tracker doesn't grow with sessions that have ended.
- A reloaded session sends the same tool list it sent before the reload, or the reset is documented.
Found while planning #4654.
- 主要语言
- Go
- 星标
- 4.6k
- 派生
- 522
- 平均合并
- 10 小时 33 分钟
- 30 天内合并 PR
- 231
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
docker/docker-agent 的其他 Issue
-
Error when trying to run sandbox example?可能已有人在做 @dgageot 于 2 天前认领。 未关闭area/cli
难度 2/5 1-3 小时 新手友好度 62/100
docker/docker-agent#4672 · 1 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
-
pkg/hooks tests fail with a misleading assertion when jq is not installed可能已有人在做 @dwin-gharibi 于 59 天前认领。 未关闭area/testing
难度 2/5 1-3 小时 新手友好度 86/100
docker/docker-agent#4052 ·
维护者通常 1 天内回复
-
`remove_directory` and `create_directory` hide work they already did when a later path fails可能已有人在做 @dwin-gharibi 于 77 天前认领。 未关闭area/tools
难度 2/5 1-3 小时 新手友好度 85/100
docker/docker-agent#3933 ·
维护者通常 1 天内回复
-
`edit_file` silently edits the first match when `oldText` occurs more than once可能已有人在做 @dwin-gharibi 于 77 天前认领。 未关闭area/tools
难度 2/5 1-3 小时 新手友好度 78/100
docker/docker-agent#3929 · 2 条评论 ·
维护者通常 1 天内回复
-
area/config area/mcp area/providers area/security kind/feat status/needs-design
难度 5/5 一周以上 新手友好度 35/100
docker/docker-agent#4703 ·
维护者通常 1 天内回复
查看 docker/docker-agent 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 91/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
praetorianer777/Dynamo#53 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
kind/engineering pulumi/pulumi-terraform Task Workflow Failure
难度 2/5 1-3 小时 新手友好度 64/100
pulumi/pulumi-terraform#1261 ·
维护者通常 1 天内回复
-
Controllers integration tests fail when port 8080 is in use可能已有人在做 @noahnut 今天认领。 未关闭area/cluster-autoscaler kind/bug needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
kubernetes-sigs/cluster-autoscaler#236 · 1 条评论 ·
维护者通常 1 天内回复