Automatically diagnoses common OpenClaw errors and provides actionable fixes for developers and agents.
npm installnode scripts/doctor.js --error-code ERR_CONFIG_01node scripts/doctor.js --log-file /path/to/openclaw.lognode scripts/doctor.js --symptoms "agent crash timeout"node scripts/doctor.js --health-checkAdd --json to any command for machine-readable output:
node scripts/doctor.js --error-code ERR_AGENT_01 --json| Category | Error Codes | Description |
|---|---|---|
| Configuration | ERR_CONFIG_01-03 | Config file issues |
| Skill | ERR_SKILL_01-03 | Skill loading and execution |
| Agent | ERR_AGENT_01-03 | Agent session and communication |
| Runtime | ERR_SIGNAL_01, ERR_MEMORY_07 | Process signals and memory |
| Installation | ERR_INSTALL_01-02 | Node.js and npm issues |
| Permission | ERR_PERMISSION_01 | File and directory access |
| Network | ERR_NETWORK_01-02 | Connectivity and rate limits |
| Session | ERR_SESSION_01-02 | Session state and limits |
| Tool | ERR_TOOL_01-02 | Tool execution and registration |
const { createDiagnosticTask, formatForAgent } = require('./scripts/integration');
const task = createDiagnosticTask({
errorCode: 'ERR_CONFIG_01',
context: { projectPath: '/my/project' }
});
// Use with agent workflow
const agentInstructions = formatForAgent(diagnosisResult);npm testMIT