coding-agents: per-turn page refresh and search-result crediting re-send the full tool guide and toolGuideExtra every turn

Aperta
#6,597 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Start with core/page-injection.ts and core/page-tools.ts, then compare buildRosterRefresh, toolGuide(opts), and the crediting field against the session-start preamble and tool descriptions. Check which hosts rely only on refresh delivery before changing the repeated content. Done means later refreshes and search results avoid repeating the guide while hosts without a session-start preamble still receive it.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

integration:coding-agents

Related to #6565 (same area, different turns).

What happens

With the default pageRefreshEveryTurns: 1, every turn from turn 2 on injects a full <hindsight_page_refresh> block. buildRosterRefresh (core/page-injection.ts) re-sends the page-index sentence plus the complete toolGuide(opts), which includes toolGuideExtra. The session-start <hindsight_pages> preamble already delivered the same guide, and the tool descriptions carry it as well, so the same text reaches the model on every turn.

Separately, hindsight_search_pages returns a crediting field (core/page-tools.ts) made of CREDIT_REMINDER plus toolGuideExtra. That repeats toolGuideExtra in every search result, although the tool description already carries it.

Measured

72 hours of real coding sessions (Pi harness, 0.8.x, about 3,000 sessions):

  • <hindsight_page_refresh>: 624 injections at about 5.6 KB each, effectively constant; 3.46 MB in total, about 90% of it guide and toolGuideExtra text the model already had.
  • hindsight_search_pages: 302 results; crediting alone was 0.73 MB.

With a one-line refresh and a reminder-only crediting, one refresh block measured 5,602 B → 177 B and one crediting 2,564 B → 550 B. The session-start preamble was unchanged.

Suggestion

  • After turn 1, make the refresh a short trigger. For example: Search this repo's N Hindsight pages (hindsight_search_pages) before bugs, tests, new work and commits; credit any hit you use. Keep the tag so hosts that parse it still work. Hosts whose only guide delivery is the refresh (no SessionStart preamble, e.g. the antigravity and kimi hooks) would keep the full block.
  • Return crediting: CREDIT_REMINDER in search results, and keep toolGuideExtra in the tool description only.
  • Or put both behind config options, so the 10 → 1 cadence that raised search use can stay while the repeated bytes go.

We currently apply this locally as an exact-anchor patch to the dist bundles and would be glad to drop it once upstream covers it.

Lingua principale
Python
Stelle
45.2k
Fork
5.9k
Merge medio
6h 18m
PR unite (30g)
354

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 vectorize-io/hindsight

Tutte le issue di vectorize-io/hindsight

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.