Skip to main content
comet doctor tells you why Comet is currently failing. It checks the installation environment, CLI and dependencies, project directories, Skill/Rule/Hook assets, Runtime, CodeGraph, and the current change status. Think of it as an environment and workspace health check: comet status tells you workflow position, while comet doctor tells you fault location. The default check is read-only and will not repair or rewrite items due to diagnosis. Supported repair actions will only be executed when --repair is explicitly used. CodeGraph is reported in four independent dimensions: CLI installation status, project index status, MCP registration status, and per-Agent effective capability. An up-to-date index only means data is synced; it does not guarantee that an Agent can use CodeGraph. For precise diagnosis, inspect the codegraph object in JSON output.

Basic usage

First, let’s look at the text output

For example, when the project-level Skill has not been installed, the Classic root directory is missing, and the CodeGraph still has content to be synchronized, comet doctor --scope project will print:
The version, path and quantity will vary with your environment, but the output structure remains the same. Understand by symbol:
  • : This check has passed and no further processing is required.
  • : Detected warnings or missing optional components. In most cases you can continue, but follow the suggested action as soon as practical.
  • : This check failed. Prioritize processing this line and the commands following run:.
In this example, what really needs to be prioritized is the Classic root directory: the configuration points to docs/openspec/, but the directory does not exist. First, run comet classic root show to view the actual configuration, and then restore the directory or use comet classic root move. current selection: no active Comet Change is not an error. It only indicates that Comet Change is not selected at present.

Which issues should be checked?

Each line in the output corresponds to a type of check:

Select the inspection range

  • --scope auto: Default value. First, check the current project; If the project is not fully installed, check the available global installations again.
  • --scope project: Only checks the current project, suitable for confirming whether the local initialization of the project has been completed.
  • --scope global: Only checks global installations, suitable for troubleshooting global skills, rules, hooks or runtimes.
If the global Comet installation is complete but the current project does not have a project-level Skill copy, --scope auto will report that the global installation is available and consider the project-level copy as an option. Run only when the project requires its own Comet configuration and a copy of the Skill:

How to read JSON output

When automated processing is required, use:
The top-level output will first tell you the overall result:
healthy: false indicates that there is at least one fail. The specific handling method is in results[].message. Both status: passed and healthy: true indicate that there are no failed items in this diagnosis. The runtime and codegraph fields will also provide the Runtime source and detailed status of the CodeGraph. The codegraph object includes cliStatus, indexStatus, mcpStatus, agents and effectiveForAgent. The Agent will only be marked as effective when the CLI is installed, the project index is up to date, and the corresponding MCP configuration points to the CodeGraph service.

When should --repair be used

First, run comet doctor without --repair to confirm the problem and suggest the action. Run only when the output clearly points to the fix, or when you have confirmed that you want to fix the Hook, Rule, selection, or migration site managed by Comet:
--repair will perform a write operation. When the migration of the Classic root directory is interrupted, select continue or rollback according to the scene. For project repairs that require your confirmation, such as CodeGraph, add --yes. If you only want to recheck, please omit --repair.

Troubleshooting sequence

Last modified on September 4, 2026