Skip to content

OpenClaw Operations: Troubleshooting and Diagnostics

Mar 28, 2026 1 min
TL;DR openclaw doctor is the all-in-one diagnostic tool, openclaw sandbox explain troubleshoots sandbox issues, and openclaw channels status --probe checks channel connectivity.

🌏 中文版

Once a system is up and running, problems will inevitably arise. This article compiles OpenClaw’s diagnostic tools and solutions for common issues.

All-in-One Diagnostics: openclaw doctor

openclaw doctor                  # Full diagnostics
openclaw doctor --fix            # Attempt automatic fixes
openclaw doctor --json           # JSON output

doctor checks:

  • Config file schema validation
  • Model authentication status
  • Channel connectivity
  • Sandbox configuration
  • Plugin status
  • Permissions and paths

Common Issues

Model Authentication

SymptomTroubleshooting
No credentials foundRun openclaw models status, verify API key or token
Token expiredopenclaw models status to check which profile expired
Rate limitedCheck API key rotation settings
openclaw models status           # View authentication status
openclaw models status --check   # Automated check (exit 1 = expired)
openclaw models status --probe   # Active probing

Channel Connectivity

openclaw channels status         # List channel status
openclaw channels status --probe # Actively probe connections
SymptomTroubleshooting
Messages not receivedCheck policy → allowlist → mention → user restrictions
DM issuesdm.enabled → policy → pairing approvals
Group issuesgroup policy → sender allowlist → mention gating

Sandbox

openclaw sandbox explain         # View effective settings
openclaw sandbox explain --agent work
openclaw sandbox explain --json
SymptomTroubleshooting
Tool blockedCheck tools.sandbox.tools.deny
Shouldn’t be sandboxedCheck sandbox.mode (under non-main, groups/channels are all considered non-main)
setupCommand failsCheck network (default is none), readOnlyRoot, user permissions

Session

openclaw sessions list           # List sessions
openclaw sessions cleanup --dry-run  # Preview cleanup
SymptomTroubleshooting
Conversations getting mixed upCheck session.dmScope (don’t use main for multi-user DMs)
Context too longManually /compact or adjust compaction settings
Memory lostCheck memory flush settings

Gateway Network

openclaw health                  # Check Gateway health
openclaw gateway status          # Gateway status
SymptomTroubleshooting
Cannot connect to GatewayCheck gateway.bind and port
WebSocket disconnectsCheck reverse proxy WS support
Trusted proxy failureCheck trustedProxies IP

Security Audit

openclaw security audit          # Security configuration check

Checks:

  • Trusted proxy auth configuration
  • Missing trustedProxies
  • Empty allowUsers
  • Insecure safeBins (interpreters/runtimes)
  • Missing safeBinProfiles

Logs

OpenClaw’s log output includes structured diagnostic codes (e.g., SECRETS_REF_IGNORED_INACTIVE_SURFACE, SECRETS_GATEWAY_AUTH_SURFACE) that can be used to trace specific behaviors.

Maintenance Scheduling

{
  session: {
    maintenance: {
      mode: "enforce",         // warn | enforce
      pruneAfterDays: 30,
      maxEntries: 500,
      rotationThresholdMb: 10
    }
  }
}

For production environments, the enforce mode with automatic cleanup is recommended.

Useful Command Reference

CommandFunction
openclaw doctorFull diagnostics
openclaw doctor --fixAutomatic repair
openclaw healthGateway health
openclaw models statusModel authentication
openclaw channels status --probeChannel probing
openclaw sandbox explainSandbox settings
openclaw security auditSecurity audit
openclaw sessions cleanup --dry-runPreview cleanup
openclaw config validateConfig validation
/context detailContext size breakdown
/tools verboseAvailable tools in detail

Overall

OpenClaw’s operations tooling is comprehensive — doctor for all-in-one diagnostics, sandbox explain for sandbox inspection, channels status --probe for connectivity checks, and security audit for security reviews. When encountering issues, start with doctor, then drill down based on the symptoms.

References

This article is compiled from the following OpenClaw source documents: