fix(prompt): include disabled skills in LRU cache key#12367
Closed
jjjojoj wants to merge 3 commits into
Closed
Conversation
…esearch#12175) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ousResearch#12176) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…2294) build_skills_system_prompt() loaded disabled set AFTER the cache check, so config changes to skills.disabled silently had no effect until restart. Move get_disabled_skill_names() before cache check and add sorted disabled tuple to cache key so any change invalidates the cache.
Contributor
|
Closing as duplicate of #7473, which was submitted first and has been merged into main as PR #12645 (commit fd119a1). Credit to you for independently identifying the same root cause — your diagnosis was correct. The gateway/run.py changes bundled in this PR (reset_command guard, cron shutdown refactor) weren't in scope for the skills-cache fix; happy to review them as a separate PR if you'd like. |
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.
Summary
Fixes #12294
build_skills_system_prompt()loaded the disabled skills set after the LRU cache check. Runtime changes toskills.disabledin config.yaml silently had no effect until gateway restart, wasting ~1,700 tokens/turn on disabled skill descriptions.Changes
get_disabled_skill_names()before the cache checktuple(sorted(disabled))to the cache key so any config change invalidates the cacheTest plan
skills.disabledin config.yaml → new prompt should reflect change without restarttest_prompt_builder.pytests passpy_compileverified