feat(background_review): make review-fork toolsets config-overridable - #36967
Closed
Wetnesday wants to merge 1 commit into
Closed
feat(background_review): make review-fork toolsets config-overridable#36967Wetnesday wants to merge 1 commit into
Wetnesday wants to merge 1 commit into
Conversation
The background skill-review fork inherits the parent agent's full toolset
so the request tools[] is byte-identical for Anthropic prefix-caching. But
on a provider with a hard tool-count cap (e.g. xAI/Grok's 200-tool limit),
once enough MCP servers are enabled the inherited set exceeds the cap and
the review request 400s ('N tools provided, maximum is 200') — the fork
never runs. Since the runtime whitelist already restricts review dispatch
to memory/skills, a narrower request set is lossless.
Add an optional config override read from background_review.enabled_toolsets
(and .disabled_toolsets). Default (key absent) inherits the parent exactly —
no behavior change for Anthropic; opt-in escape hatch for capped providers.
Contributor
|
Thanks for targeting the review-fork schema cap without changing the default cache-parity path. Current main still forwards the parent toolsets to the fork at Problems
Suggested changes
Current main has refactored this constructor for resolved runtime metadata in Automated hermes-sweeper review. |
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
Makes the background skill-review fork's toolsets config-overridable via
background_review.enabled_toolsets(and.disabled_toolsets) inagent/background_review.py.Default behavior is unchanged: when the config keys are absent, the fork inherits the parent agent's toolsets exactly as before (so the request
tools[]stays byte-identical for Anthropic prefix-caching).Why
The review fork inherits the parent's full toolset so
tools[]is byte-identical for cache parity. But on a provider with a hard tool-count cap — e.g. xAI/Grok's 200-tool limit — once enough MCP servers are enabled, the inherited set exceeds the cap and the review request 400s (N tools provided, maximum is 200), so the fork never runs and no skill is produced.Since the runtime whitelist already restricts review dispatch to
memory/skills, a narrower request set is lossless. This adds an opt-in escape hatch for capped providers without changing anything for Anthropic.Behavior change
None unless
background_review.enabled_toolsetsis set in config. The config read is wrapped in try/except and falls back to the previousgetattr(agent, "enabled_toolsets", None)inheritance.Example config