You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Run cache can return a stale result when a Connection is reconfigured in place #45
runCacheKey keys on the fields that shape a Pass, but a Connection contributes three more
wire-shaping fields that are not in the key. The doc comment above RunCacheKeyInput and the
behaviour disagree.
src/wire/protocols.ts:63 merges connection.extraHeaders into every request.
All three are editable in place under the same Connection id from the Connections panel.
Impact
A writer runs a Pass, then raises the output ceiling (or turns reasoning effort on, or adds an X-Tenant header a proxy requires) and runs again. runModelPassNow finds the old entry and resultFromCache returns the previous Findings without calling the Provider. The change looks
ignored, and there is no way to force a re-run short of editing the Document.
This is the same class of bug the #16 fixes addressed for Protocol and base URL — which is why
those two are in the key.
Fix
Add the three fields to RunCacheKeyInput and to the key array. extraHeaders is a record, so
hash its entries in a stable order rather than trusting JSON.stringify key order.
Where the test goes
src/core/runCache.test.ts — a case per field asserting a cache miss when it changes.
Origin
Found by the Thermos review (thermo-nuclear, core/wire).
Fixed in #74 (merged into v1.3): maxOutputTokens, reasoningEffort and a sorted hash of extraHeaders are now in the run-cache key, with a miss test per field.
Activity
fix: key the Run cache on a Connection's ceiling, reasoning and heade…
kiran-brahma commentedon Sep 26, 2026
Fixed in #74 (merged into
v1.3):maxOutputTokens,reasoningEffortand a sorted hash ofextraHeadersare now in the run-cache key, with a miss test per field.Generated by Claude Code