doctor
Diagnose agent configuration issues before starting work.
Synopsis
Bash
The doctor command runs diagnostics on your configured AI agent to verify it's fully operational before you start working. This helps identify common configuration issues.
Options
| Option | Description |
|---|---|
--agent <name> | Check specific agent (default: configured agent) |
--json | Output in JSON format |
--cwd <path> | Working directory (default: current directory) |
-h, --help | Show help message |
Diagnostic Checks
The doctor command runs two checks:
1. Detection
Verifies the agent CLI is installed and accessible:
- Checks if the CLI executable exists
- Verifies it's in PATH or configured location
- Reports the detected version
2. Preflight
Sends a test prompt to verify the agent can respond:
- Confirms API keys are configured
- Verifies network connectivity
- Tests actual agent responsiveness
Examples
Basic Usage
Bash
Output Formats
Bash
Sample Output
Exit Codes
| Code | Meaning |
|---|---|
0 | Agent is healthy and ready to use |
1 | Agent has configuration issues |
Common Issues
OpenCode
Solution: Set a default model in your OpenCode configuration.
Claude Code
Solution: Set the ANTHROPIC_API_KEY environment variable.
Factory Droid
Solution: Install Factory Droid and ensure it's in your PATH.