Skip to content

Doctor

The Doctor is CodeBuddy’s built-in diagnostics engine. It runs 9 modular checks against your workspace configuration and reports findings with severity levels, actionable descriptions, and auto-fix support.

CodeBuddy: Run Doctor

Doctor results appear in the CodeBuddy Doctor output channel and update a status bar indicator.

CheckWhat it validates
API Key AuditKeys exist in SecretStorage, aren’t placeholders, no leaked keys in settings.json
Input ValidatorInput guard patterns are functional and cover browser refs + keyboard keys
Terminal RestrictionsBlocked command patterns are compiled and cover catastrophic operations
Directory PermissionsWorkspace directory exists, is readable/writable, .codebuddy/ dir is accessible
MCP ConfigMCP server entries are well-formed, commands exist, env vars are set
Security Config.codebuddy/security.json loads without errors, regex patterns compile, no invalid entries
Credential ProxyIf enabled, proxy is reachable and session tokens are valid
Permission ScopeActive profile is valid, custom deny patterns compile, tool allow/blocklists are consistent
Access ControlMode is valid, user lists are non-empty when required, identity resolution works
SeverityMeaningIcon
CriticalBlocks agent functionality or exposes a security vulnerability🔴
WarnNon-blocking but may cause unexpected behavior🟡
InfoSuggestion for improvement🔵

Findings are sorted critical → warn → info.

Some findings include an auto-fix. Run all available fixes at once:

CodeBuddy: Doctor Auto-Fix

Auto-fixable issues include:

  • Creating missing .codebuddy/ directories
  • Generating starter security.json or permissions.json files
  • Removing placeholder API keys from settings

The Doctor status bar item shows a summary after each run:

  • — No issues found
  • ⚠ N — N warnings
  • ✕ N — N critical issues

Click the status bar item to re-run Doctor.

Doctor runs automatically at extension activation (after a short delay) and when you open a new workspace. To suppress background runs, you can dismiss the status bar item — Doctor will only run when invoked manually.

If Doctor is already running when you trigger it again, the second call joins the in-flight scan rather than starting a new one. This prevents duplicate work when multiple subsystems request a health check simultaneously.