Repository navigation
fix(agents): cap aggregate pressure warning dedupe cache with LRU eviction - #108667
Merged
steipete merged 3 commits intoJul 16, 2026
Merged
Conversation
RileyJJY
force-pushed
the
fix/aggregate-pressure-dedupe-cache
branch
from
July 16, 2026 06:21
94ad67b to
24e6fe2
Compare
RileyJJY
force-pushed
the
fix/aggregate-pressure-dedupe-cache
branch
2 times, most recently
from
July 16, 2026 07:09
f0510d6 to
41521f5
Compare
steipete
force-pushed
the
fix/aggregate-pressure-dedupe-cache
branch
from
July 16, 2026 08:45
41521f5 to
bb90238
Compare
Contributor
|
Maintainer pass complete. I replaced both process-lifetime warning dedupe sets with independent instances of the shared bounded cache, so prompt-pressure and persisted-recovery logging retain their existing warn-once behavior without unbounded growth or cross-path eviction. The regression test fills each cache past 1,024 entries, verifies oldest-entry eviction, and verifies the evicted session can warn again. Proof:
|
Contributor
|
Merged via squash.
|
This was referenced Jul 16, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 17, 2026
…ction (openclaw#108667) * fix(agents): cap aggregate pressure warning dedupe cache with LRU eviction * fix(agents): bound tool-result warning dedupe * fix(agents): keep warning cache limit internal --------- Co-authored-by: Peter Steinberger <[email protected]>
This was referenced Jul 17, 2026
zooqueen
pushed a commit
to zooqueen/openclaw
that referenced
this pull request
Sep 11, 2026
…ction (openclaw#108667) * fix(agents): cap aggregate pressure warning dedupe cache with LRU eviction * fix(agents): bound tool-result warning dedupe * fix(agents): keep warning cache limit internal --------- Co-authored-by: Peter Steinberger <[email protected]>
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.
What Problem This Solves
The module-level
aggregateToolResultPressureWarningsdeduplication Set insrc/agents/embedded-agent-runner/run/attempt-prompt-context.tsgrows without bound for the lifetime of the gateway process. Every distinct session that hits aggregate tool-result pressure adds a new key (persessionKey), and the Set is never trimmed.Why This Change Was Made
A 1024-entry FIFO eviction cap (
AGGREGATE_PRESSURE_WARNING_DEDUPE_LIMIT) and insertion-order array track eviction order so the cache cannot grow past a fixed ceiling. The oldest warning key is evicted when the limit is reached. This matches the existing pattern insrc/agents/bootstrap-files.ts(BOOTSTRAP_WARNING_DEDUPE_LIMITwith explicit eviction viabootstrapWarningOrder).User Impact
No user-visible behavior change. The first aggregate-pressure warning for a session still emits a log warning; repeat warnings for the same session key are still suppressed. After 1024 distinct session keys, the oldest entries are silently replaced.
Evidence
node scripts/run-vitest.mjs src/agents/embedded-agent-runner/run/attempt-prompt-context.test.ts— 5/5 passedgit diff --checkpassedoxfmtpassed on all changed filesscripts/proof-aggregate-pressure-dedupe.ts (save in repo root, run with npx tsx)
AI-assisted: built with Codex