Repository navigation
Run cache can return a stale result when a Connection is reconfigured in place - #74
Merged
Merged
Conversation
A Connection's output ceiling, reasoning effort and extra headers are edited in place under the same id and all reach the wire, but none was in the Run cache key, so a re-run after changing one returned the previous Findings without a Provider call. All three now join the key; the extra headers are hashed as sorted entries so insertion order cannot cause a miss and no header value is stored in the key. Closes #45. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FjB3Gu8vhg5enkAneTdqga
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Sep 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #45.
A Connection's output ceiling, reasoning effort and extra headers now join the Run cache key alongside Protocol and base URL. The extra headers are hashed as entries sorted by code unit, so the same headers in a different insertion order still hit. Hashing also keeps any header value, which could be a credential, out of the stored key.
RunCacheRecordis unchanged, so there is no Dexie migration.Acceptance criteria
maxOutputTokensadded toRunCacheKeyInputand to the key array. Verified bysrc/core/runCache.test.ts("misses when the output ceiling changes").reasoningEffortadded toRunCacheKeyInputand to the key array. Verified by "misses when reasoning effort changes".extraHeadersadded and hashed in a stable order rather than byJSON.stringifykey order. Verified by "misses when an extra header is added, changed or removed" and "hits for the same extra headers in a different insertion order".runModelPassNowpasses the Connection's three settings through. Verified at the seam insrc/storage/modelRuns.test.ts, where a Connection reconfigured in place makes a fresh Provider request.RunCacheKeyInputandrunCacheKeynow matches what the code does.pnpm test(1002 passed),pnpm typecheck,pnpm run gatesandpnpm buildall pass.No visual criteria.
🤖 Generated with Claude Code
Generated by Claude Code