fix(doctor): stop warning about tools that exist - #9686
Open
dadgrand wants to merge 1 commit into
Open
Conversation
isBuiltinOrMetaTool is a hand-written list of tool names, and it had drifted from the tools that actually ship: use_capability, compress and update_goal were all missing. Every session carrying a skill that names one of them — including the built-in review and security-review skills, which both list use_capability — reported skill "review" allowed-tools references "use_capability" which is not in the current registry on every doctor run, for a tool that is present. Consult the built-in registry first, which cannot drift, and keep the list as the fallback it already was. compress and update_goal are registered built-ins and are now covered automatically; use_capability is wired up at boot rather than registered, so it is added to the list explicitly with a note saying why. Verified: 2 warnings before, 0 after, on an otherwise unchanged config.
dadgrand
force-pushed
the
fix/doctor-builtin-allowlist
branch
from
September 1, 2026 11:16
818d40f to
e38b33e
Compare
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
doctorwarns about tools that exist.isBuiltinOrMetaToolis a hand-written name list and it had drifted from what actually ships:use_capability,compressandupdate_goalwere all missing from it.reviewandsecurity-reviewskills both nameuse_capabilityin allowed-tools, so every doctor run on a default install prints two warnings for a tool that is present:tool.LookupBuiltin, which cannot drift, and keep the hand-written list as the fallback it already was.compressandupdate_goalare registered built-ins and are now covered automatically.use_capabilityis wired up at boot rather than registered, so it is added to the list explicitly with a comment saying why.Issues
Verification
go test ./...passes.gofmt -l .andgo vet ./...clean. Go 1.26.2, darwin/arm64.internal/doctor/skill_health_registry_test.go:TestAllowedToolsAcceptsAnyRegisteredBuiltinregisters a probe tool and asserts it is not reported missing — this pins the registry path rather than a name list, so the same drift cannot recur.TestAllowedToolsStillWarnsOnAnUnknownNameasserts a genuinely unknown name still warns, so the softened check does not silence real typos.Documentation impact
Documentation-impact: none - diagnostics output only; no CLI, config, provider, permission or tool behavior changes.
Cache impact
Cache-impact: none -
internal/doctoroutput never enters the provider request; no system prompt, memory prefix, tool schema or tool surface is touched.Cache-guard: not applicable - no cache-sensitive path is modified.
go test ./internal/boot/ -run TestGoldenBaselineNoExtensionsstill passes unchanged.System-prompt-review: N/A