Repository navigation
fix(agents): skip provider discovery when cache pruning is disabled - #117396
Merged
Merged
Conversation
steipete
marked this pull request as ready for review
August 1, 2026 12:09
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 2, 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.
What Problem This Solves
The embedded-agent refactor in #117313 reversed the existing cache-TTL guard order. Every embedded agent attempt now resolves provider eligibility before checking whether cache-TTL pruning is enabled. Provider eligibility enters plugin/runtime discovery without the caller configuration, so default or explicitly disabled pruning can still cold-load installed plugin metadata, including when plugins are disabled. Real
openclaw tui --localPTY scenarios consequently rose to approximately 83-85 seconds each and intermittently exhausted the CI silence watchdog.Why This Change Was Made
Restore the original producer-owned, configuration-first short circuit in
installEmbeddedAttemptContextGuards: inspectcontextPruning.modefirst and invoke provider eligibility only for explicitcache-ttl. This matches the existing sibling cache-marker guard and preserves eligible/ineligible provider behavior, timestamps, prompt transforms, and cleanup. The production change is exactly 7 additions and 7 deletions: zero net production lines, no new configuration, no provider special cases, and no reporter/timeout workaround.User Impact
Default local TUI and embedded-agent launches no longer perform unnecessary cold plugin discovery. Real remote PTY subprocess measurements using the actual embedded runtime, with only the external model HTTP endpoint mocked:
Explicitly configured cache-TTL pruning continues to discover provider capabilities and project expired history exactly as before.
Evidence
tui --localPTY subprocess and embedded-runtime scenarios passed: exactly 3 selected, 3 passed, 0 failed, 0 selected skips; wall-clock case times 11.76s, 5.46s, and 5.31s. Same-turn steering produced two real provider requests and rendered the completion. Thirteen unrelated gateway/unit cases were explicitly name-filtered, not reported as skips.pnpm check:changed --base origin/main -- <two changed files>passed: core and testtsgo, targeted lint, SDK/API, provider/plugin boundaries, dead-code, database, webhook/pairing, and zero runtime-cycle guards.