Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

fix(runtime): prune and persist the tool DeferralTracker

Aperta
#4,685 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@aheritier ci sta già lavorando.

Dal 21/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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.

Lingua principale
Go
Stelle
4.6k
Fork
529
Merge medio
14h 30m
PR unite (30g)
157

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di docker/docker-agent

Tutte le issue di docker/docker-agent

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.