Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

fix(runtime): prune and persist the tool DeferralTracker

Đang mở
#4,685 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@aheritier đang làm issue này rồi.

Từ ngày 21/10/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

area/runtime area/sessions

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.

Ngôn ngữ chính
Go
Star
4.6k
Fork
522
Merge trung bình
10 giờ 33 phút
Pull request đã merge (30 ngày)
231

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của docker/docker-agent

Tất cả issue của docker/docker-agent

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.