openclaw doctor OpenClaw के लिए मरम्मत + माइग्रेशन टूल है। यह पुराने config/state को ठीक करता है, स्वास्थ्य जांचता है, और लागू करने योग्य मरम्मत चरण देता है।
त्वरित शुरुआत
Headless और automation मोड
- --yes
- --fix
- --lint
- --fix --force
- --non-interactive
- --deep
Read-only lint मोड
openclaw doctor --lint, openclaw doctor --fix का automation-अनुकूल sibling है। दोनों doctor health checks का उपयोग करते हैं, लेकिन उनका रुख
अलग है:
| मोड | Prompts | config/state लिखता है | Output | इसके लिए उपयोग करें |
|---|---|---|---|---|
openclaw doctor | हां | नहीं | अनुकूल health report | status जांचने वाला मानव |
openclaw doctor --fix | कभी-कभी | हां, repair policy के साथ | अनुकूल repair log | approved repairs लागू करना |
openclaw doctor --lint | नहीं | नहीं | structured findings | CI, preflight, और review gates |
repair() implementation दे सकते हैं।
doctor --fix मौजूद होने पर उन repairs को लागू करता है और उन checks के लिए मौजूदा doctor repair flow का उपयोग जारी रखता है जो अभी migrate नहीं हुए हैं।
Structured repair contract repair reporting को detection से भी अलग करता है:
detect() मौजूदा findings report करता है, जबकि repair() changes,
config/file diffs, और non-file side effects report कर सकता है। यह भविष्य के doctor --fix --dry-run और diff output के लिए migration path खुला रखता है, बिना lint checks को
mutations plan करवाए।
उदाहरण:
ok: क्या कोई visible finding selected severity threshold पर पहुंचीchecksRun: execute किए गए health checks की संख्याchecksSkipped: selected profile,--only, या--skipसे छोड़ी गई checksfindings:checkId,severity,message, और वैकल्पिकpath,line,column,ocPath, औरfixHintके साथ structured diagnostics
0: selected threshold पर या उससे ऊपर कोई findings नहीं1: एक या अधिक findings selected threshold पर पहुंचीं2: lint findings emit होने से पहले command/runtime failure
--severity-min info|warning|error का उपयोग करें। Complete lint inventory चलाने के लिए --all का उपयोग करें,
जिसमें default automation set से बाहर रखे गए deeper opt-in checks भी शामिल हैं। संकरे preflight gates के लिए --only <id> और
बाकी lint run को सक्रिय रखते हुए शोर वाली check को अस्थायी रूप से बाहर करने के लिए
--skip <id> का उपयोग करें।
--json, --severity-min, --all, --only, और
--skip जैसे lint-output options को --lint के साथ जोड़ा जाना चाहिए; regular doctor और repair runs उन्हें reject करते हैं।
यह क्या करता है (सारांश)
Health, UI, और updates
Health, UI, और updates
- git installs के लिए वैकल्पिक pre-flight update (केवल interactive)।
- UI protocol freshness check (protocol schema नया होने पर Control UI rebuild करता है)।
- Health check + restart prompt।
- Skills status summary (eligible/missing/blocked) और plugin status।
Config और migrations
Config और migrations
- legacy values के लिए config normalization।
- legacy flat
talk.*fields सेtalk.provider+talk.providers.<provider>में Talk config migration। - legacy Chrome extension configs और Chrome MCP readiness के लिए browser migration checks।
- OpenCode provider override warnings (
models.providers.opencode/models.providers.opencode-go)। - Legacy OpenAI Codex provider/profile migration (
openai-codex→openai) और stalemodels.providers.openai-codexके लिए shadowing warnings। - OpenAI Codex OAuth profiles के लिए OAuth TLS prerequisites check।
- जब
plugins.allowrestrictive हो लेकिन tool policy अभी भी wildcard या plugin-owned tools मांगती हो, तब Plugin/tool allowlist warnings। - Legacy on-disk state migration (sessions/agent dir/WhatsApp auth)।
- Legacy plugin manifest contract key migration (
speechProviders,realtimeTranscriptionProviders,realtimeVoiceProviders,mediaUnderstandingProviders,imageGenerationProviders,videoGenerationProviders,webFetchProviders,webSearchProviders→contracts)। - Legacy cron store migration (
jobId,schedule.cron, top-level delivery/payload fields, payloadprovider,notify: truewebhook fallback jobs)। - Legacy whole-agent runtime-policy cleanup; provider/model runtime policy सक्रिय route selector है।
- plugins enabled होने पर stale plugin config cleanup; जब
plugins.enabled=falseहो, stale plugin references को inert containment config माना जाता है और preserve किया जाता है।
State और integrity
State और integrity
- Session lock file inspection और stale lock cleanup।
- प्रभावित 2026.4.24 builds द्वारा बनाए गए duplicated prompt-rewrite branches के लिए session transcript repair।
- Wedged subagent restart-recovery tombstone detection,
--fixsupport के साथ stale aborted recovery flags clear करने के लिए, ताकि startup child को restart-aborted मानता न रहे। - State integrity और permissions checks (sessions, transcripts, state dir)।
- locally चलने पर config file permission checks (chmod 600)।
- Model auth health: OAuth expiry checks करता है, expiring tokens refresh कर सकता है, और auth-profile cooldown/disabled states report करता है।
Gateway, services, और supervisors
Gateway, services, और supervisors
- sandboxing enabled होने पर Sandbox image repair।
- Legacy service migration और extra gateway detection।
- Matrix channel legacy state migration (
--fix/--repairmode में)। - Gateway runtime checks (service installed but not running; cached launchd label)।
- Channel status warnings (running gateway से probed)।
- Channel-specific permission checks
openclaw channels capabilitiesके अंतर्गत रहते हैं; उदाहरण के लिए, Discord voice channel permissions कोopenclaw channels capabilities --channel discord --target channel:<channel-id>से audit किया जाता है। - local TUI clients अभी भी चल रहे हों तो degraded Gateway event-loop health के लिए WhatsApp responsiveness checks;
--fixकेवल verified local TUI clients को stop करता है। - primary models, fallbacks, image/video generation models, heartbeat/subagent/compaction overrides, hooks, channel model overrides, और session route pins में legacy
openai-codex/*model refs के लिए Codex route repair;--fixउन्हेंopenai/*में rewrite करता है,openai-codex:*auth profiles/order कोopenai:*में migrate करता है, stale session/whole-agent runtime pins हटाता है, और canonical OpenAI agent refs को default Codex harness पर छोड़ता है। - optional repair के साथ Supervisor config audit (launchd/systemd/schtasks)।
- gateway services के लिए embedded proxy environment cleanup, जिन्होंने install या update के दौरान shell
HTTP_PROXY/HTTPS_PROXY/NO_PROXYvalues capture किए थे। - Gateway runtime best-practice checks (Node vs Bun, version-manager paths)।
- Gateway port collision diagnostics (default
18789)।
Auth, security, और pairing
Auth, security, और pairing
- open DM policies के लिए security warnings।
- local token mode के लिए Gateway auth checks (token source मौजूद न होने पर token generation offer करता है; token SecretRef configs overwrite नहीं करता)।
- Device pairing trouble detection (pending first-time pair requests, pending role/scope upgrades, stale local device-token cache drift, और paired-record auth drift)।
Workspace और shell
Workspace और shell
- Linux पर systemd linger check।
- Workspace bootstrap file size check (context files के लिए truncation/near-limit warnings)।
- default agent के लिए Skills readiness check; missing bins, env, config, या OS requirements वाले allowed skills report करता है, और
--fixunavailable skills कोskills.entriesमें disable कर सकता है। - Shell completion status check और auto-install/upgrade।
- Memory search embedding provider readiness check (local model, remote API key, या QMD binary)।
- Source install checks (pnpm workspace mismatch, missing UI assets, missing tsx binary)।
- updated config + wizard metadata लिखता है।
Dreams UI backfill और reset
Control UI Dreams scene में grounded dreaming workflow के लिए Backfill, Reset, और Clear Grounded actions शामिल हैं। ये actions gateway doctor-style RPC methods का उपयोग करते हैं, लेकिन येopenclaw doctor CLI repair/migration का हिस्सा नहीं हैं।
वे क्या करते हैं:
- Backfill active workspace में historical
memory/YYYY-MM-DD.mdfiles scan करता है, grounded REM diary pass चलाता है, और reversible backfill entries कोDREAMS.mdमें लिखता है। - Reset केवल उन marked backfill diary entries को
DREAMS.mdसे हटाता है। - Clear Grounded केवल staged grounded-only short-term entries को हटाता है जो historical replay से आई थीं और जिनमें अभी live recall या daily support जमा नहीं हुआ है।
- वे
MEMORY.mdedit नहीं करते - वे full doctor migrations नहीं चलाते
- वे grounded candidates को live short-term promotion store में अपने आप stage नहीं करते, जब तक आप पहले staged CLI path explicit रूप से न चलाएं
DREAMS.md को review surface बनाए रखता है।
विस्तृत व्यवहार और तर्क
0. वैकल्पिक update (git installs)
0. वैकल्पिक update (git installs)
1. Config normalization
1. Config normalization
messages.ackReaction), तो doctor उन्हें current schema में normalize करता है।इसमें legacy Talk flat fields शामिल हैं। Current public Talk speech config talk.provider + talk.providers.<provider> है, और realtime voice config talk.realtime.* है। Doctor पुराने talk.voiceId / talk.voiceAliases / talk.modelId / talk.outputFormat / talk.apiKey shapes को provider map में rewrite करता है, और legacy top-level realtime selectors (talk.mode, talk.transport, talk.brain, talk.model, talk.voice) को talk.realtime में rewrite करता है।Doctor तब भी चेतावनी देता है जब plugins.allow खाली न हो और टूल नीति
wildcard या Plugin-स्वामित्व वाली टूल प्रविष्टियों का उपयोग करती हो। tools.allow: ["*"] केवल उन टूल से मेल खाता है
जो वास्तव में लोड होने वाले plugins से आते हैं; यह विशेष Plugin
allowlist को bypass नहीं करता।2. लेगसी कॉन्फ़िग कुंजी माइग्रेशन
2. लेगसी कॉन्फ़िग कुंजी माइग्रेशन
openclaw doctor चलाने को कहते हैं।Doctor करेगा:- बताएगा कि कौन-सी लेगसी कुंजियाँ मिलीं।
- वह माइग्रेशन दिखाएगा जो उसने लागू किया।
- अपडेट किए गए schema के साथ
~/.openclaw/openclaw.jsonको फिर से लिखेगा।
openclaw doctor --fix चलाने को कहता है; यह startup पर openclaw.json को फिर से नहीं लिखता। Cron job store migrations भी openclaw doctor --fix से संभाले जाते हैं।मौजूदा migrations:routing.allowFrom→channels.whatsapp.allowFromrouting.groupChat.requireMention→channels.whatsapp/telegram/imessage.groups."*".requireMentionrouting.groupChat.historyLimit→messages.groupChat.historyLimitrouting.groupChat.mentionPatterns→messages.groupChat.mentionPatternschannels.telegram.requireMention→channels.telegram.groups."*".requireMention- retired
channels.webchatऔरgateway.webchatहटाएँ routing.queue→messages.queuerouting.bindings→ top-levelbindingsrouting.agents/routing.defaultAgentId→agents.list+agents.list[].default- लेगसी
talk.voiceId/talk.voiceAliases/talk.modelId/talk.outputFormat/talk.apiKey→talk.provider+talk.providers.<provider> - लेगसी top-level realtime Talk selectors (
talk.mode/talk.transport/talk.brain/talk.model/talk.voice) +talk.provider/talk.providers→talk.realtime routing.agentToAgent→tools.agentToAgentrouting.transcribeAudio→tools.media.audio.modelsmessages.tts.<provider>(openai/elevenlabs/microsoft/edge) →messages.tts.providers.<provider>messages.tts.provider: "edge"औरmessages.tts.providers.edge→messages.tts.provider: "microsoft"औरmessages.tts.providers.microsoft- TTS speaker selection fields (
voice/voiceName/voiceId) →speakerVoice/speakerVoiceId channels.discord.voice.tts.<provider>(openai/elevenlabs/microsoft/edge) →channels.discord.voice.tts.providers.<provider>channels.discord.accounts.<id>.voice.tts.<provider>(openai/elevenlabs/microsoft/edge) →channels.discord.accounts.<id>.voice.tts.providers.<provider>plugins.entries.voice-call.config.tts.<provider>(openai/elevenlabs/microsoft/edge) →plugins.entries.voice-call.config.tts.providers.<provider>plugins.entries.voice-call.config.tts.provider: "edge"औरplugins.entries.voice-call.config.tts.providers.edge→provider: "microsoft"औरproviders.microsoftplugins.entries.voice-call.config.provider: "log"→"mock"plugins.entries.voice-call.config.twilio.from→plugins.entries.voice-call.config.fromNumberplugins.entries.voice-call.config.streaming.sttProvider→plugins.entries.voice-call.config.streaming.providerplugins.entries.voice-call.config.streaming.openaiApiKey|sttModel|silenceDurationMs|vadThreshold→plugins.entries.voice-call.config.streaming.providers.openai.*bindings[].match.accountID→bindings[].match.accountId- जिन channels में नामित
accountsहैं लेकिन single-account top-level channel values बचे हुए हैं, उन account-scoped values को उस channel के लिए चुने गए promoted account में ले जाएँ (अधिकांश channels के लिएaccounts.default; Matrix किसी मौजूदा matching named/default target को सुरक्षित रख सकता है) identity→agents.list[].identityagent.*→agents.defaults+tools.*(tools/elevated/exec/sandbox/subagents)agent.model/allowedModels/modelAliases/modelFallbacks/imageModelFallbacks→agents.defaults.models+agents.defaults.model.primary/fallbacks+agents.defaults.imageModel.primary/fallbacksagents.defaults.llmहटाएँ; धीमे provider/model timeouts के लिएmodels.providers.<id>.timeoutSecondsका उपयोग करें, और जब पूरी run को अधिक देर तक चलना हो तो agent/run timeout को उस मान से ऊपर रखेंbrowser.ssrfPolicy.allowPrivateNetwork→browser.ssrfPolicy.dangerouslyAllowPrivateNetworkbrowser.profiles.*.driver: "extension"→"existing-session"browser.relayBindHostहटाएँ (लेगसी extension relay setting)- लेगसी
models.providers.*.api: "openai"→"openai-completions"(Gateway startup उन providers को भी छोड़ देता है जिनकाapiकिसी future या unknown enum value पर सेट है, बंद होकर fail होने के बजाय) plugins.entries.codex.config.codexDynamicToolsProfileहटाएँ; Codex app-server हमेशा Codex-native workspace tools को native रखता है
- अगर दो या अधिक
channels.<channel>.accountsentrieschannels.<channel>.defaultAccountयाaccounts.defaultके बिना configured हैं, तो doctor चेतावनी देता है कि fallback routing कोई अनपेक्षित account चुन सकती है। - अगर
channels.<channel>.defaultAccountकिसी unknown account ID पर सेट है, तो doctor चेतावनी देता है और configured account IDs सूचीबद्ध करता है।
2b. OpenCode provider overrides
2b. OpenCode provider overrides
models.providers.opencode, opencode-zen, या opencode-go manually जोड़ा है, तो यह openclaw/plugin-sdk/llm से built-in OpenCode catalog को override करता है। इससे models गलत API पर force हो सकते हैं या costs zero हो सकती हैं। Doctor चेतावनी देता है ताकि आप override हटा सकें और per-model API routing + costs restore कर सकें।2c. Browser migration और Chrome MCP readiness
2c. Browser migration और Chrome MCP readiness
browser.profiles.*.driver: "extension"becomes"existing-session"browser.relayBindHostहटाया जाता है
defaultProfile: "user" या configured existing-session profile का उपयोग करते हैं, तो Doctor host-local Chrome MCP path का audit भी करता है:- default auto-connect profiles के लिए जाँचता है कि Google Chrome उसी host पर installed है या नहीं
- detected Chrome version की जाँचता है और Chrome 144 से कम होने पर चेतावनी देता है
- आपको browser inspect page में remote debugging enable करने की याद दिलाता है (उदाहरण के लिए
chrome://inspect/#remote-debugging,brave://inspect/#remote-debugging, याedge://inspect/#remote-debugging)
- gateway/node host पर Chromium-based browser 144+
- browser locally चल रहा हो
- उस browser में remote debugging enabled हो
- browser में पहले attach consent prompt को approve करना
responsebody, PDF export, download interception, और batch actions जैसे advanced routes के लिए अभी भी managed browser या raw CDP profile चाहिए।यह check Docker, sandbox, remote-browser, या अन्य headless flows पर लागू नहीं होता। वे raw CDP का उपयोग जारी रखते हैं।2d. OAuth TLS prerequisites
2d. OAuth TLS prerequisites
UNABLE_TO_GET_ISSUER_CERT_LOCALLY, expired cert, या self-signed cert), तो doctor platform-specific fix guidance print करता है। macOS पर Homebrew Node के साथ, fix आम तौर पर brew postinstall ca-certificates होता है। --deep के साथ, probe Gateway healthy होने पर भी चलता है।2e. Codex OAuth provider overrides
2e. Codex OAuth provider overrides
models.providers.openai-codex के तहत लेगसी OpenAI transport settings जोड़ी थीं, तो वे built-in Codex OAuth provider path को shadow कर सकती हैं, जिसका नए releases अपने आप उपयोग करते हैं। Doctor जब Codex OAuth के साथ वे पुराने transport settings देखता है तो चेतावनी देता है, ताकि आप stale transport override हटा या फिर से लिख सकें और built-in routing/fallback behavior वापस पा सकें। Custom proxies और header-only overrides अभी भी supported हैं और यह warning trigger नहीं करते।2f. Codex route repair
2f. Codex route repair
openai-codex/* model refs की जाँच करता है। Native Codex harness routing canonical openai/* model refs का उपयोग करती है; OpenAI agent turns OpenClaw OpenAI provider path के बजाय Codex app-server harness से गुजरते हैं।--fix / --repair mode में, doctor affected default-agent और per-agent refs को फिर से लिखता है, जिनमें primary models, fallbacks, image/video generation models, heartbeat/subagent/compaction overrides, hooks, channel model overrides, और stale persisted session route state शामिल हैं:openai-codex/gpt-*becomesopenai/gpt-*.- Codex intent repaired agent model refs के लिए provider/model-scoped
agentRuntime.id: "codex"entries में जाता है। - Stale whole-agent runtime config और persisted session runtime pins हटाए जाते हैं क्योंकि runtime selection provider/model-scoped है।
- Existing provider/model runtime policy सुरक्षित रखी जाती है जब तक repaired legacy model ref को पुराना auth path बनाए रखने के लिए Codex routing की जरूरत न हो।
- Existing model fallback lists अपनी legacy entries rewrite करके सुरक्षित रखी जाती हैं; copied per-model settings legacy key से canonical
openai/*key में जाती हैं। - Persisted session
modelProvider/providerOverride,model/modelOverride, fallback notices, और auth-profile pins सभी discovered agent session stores में repaired किए जाते हैं। /codex ...का अर्थ है “chat से native Codex conversation को control या bind करें।”/acp ...याruntime: "acp"का अर्थ है “external ACP/acpx adapter का उपयोग करें।”
2g. Session route cleanup
2g. Session route cleanup
openclaw doctor --fix auto-created stale state को clear कर सकता है, जैसे modelOverrideSource: "auto" model pins, runtime model metadata, pinned harness ids, CLI session bindings, और auto auth-profile overrides, जब उनका owning route अब configured नहीं है। Explicit user या legacy session model choices manual review के लिए reported होते हैं और untouched छोड़े जाते हैं; जब वह route अब intended न हो, तो उन्हें /model ..., /new से switch करें, या session reset करें।3. लेगसी state migrations (disk layout)
3. लेगसी state migrations (disk layout)
- Sessions store + transcripts:
~/.openclaw/sessions/से~/.openclaw/agents/<agentId>/sessions/में
- Agent dir:
~/.openclaw/agent/से~/.openclaw/agents/<agentId>/agent/में
- WhatsApp auth state (Baileys):
- लेगसी
~/.openclaw/credentials/*.jsonसे (oauth.jsonको छोड़कर) ~/.openclaw/credentials/whatsapp/<accountId>/...में (default account id:default)
- लेगसी
openclaw doctor के माध्यम से migrate किया जाता है। Talk provider/provider-map normalization अब structural equality से compare करता है, इसलिए key-order-only diffs अब repeat no-op doctor --fix changes trigger नहीं करते।3a. पुराने Plugin मैनिफेस्ट माइग्रेशन
3a. पुराने Plugin मैनिफेस्ट माइग्रेशन
speechProviders, realtimeTranscriptionProviders, realtimeVoiceProviders, mediaUnderstandingProviders, imageGenerationProviders, videoGenerationProviders, webFetchProviders, webSearchProviders) के लिए स्कैन करता है। मिलने पर, यह उन्हें contracts ऑब्जेक्ट में ले जाने और मैनिफेस्ट फ़ाइल को उसी स्थान पर फिर से लिखने की पेशकश करता है। यह माइग्रेशन idempotent है; यदि contracts कुंजी में पहले से वही मान हैं, तो डेटा को डुप्लिकेट किए बिना legacy कुंजी हटा दी जाती है।3b. पुराने cron स्टोर माइग्रेशन
3b. पुराने cron स्टोर माइग्रेशन
~/.openclaw/cron/jobs.json, या ओवरराइड होने पर cron.store) की भी जांच करता है जिन्हें scheduler अभी भी compatibility के लिए स्वीकार करता है।मौजूदा cron cleanups में शामिल हैं:jobId→idschedule.cron→schedule.expr- शीर्ष-स्तरीय payload fields (
message,model,thinking, …) →payload - शीर्ष-स्तरीय delivery fields (
deliver,channel,to,provider, …) →delivery - payload
providerdelivery aliases → स्पष्टdelivery.channel - legacy
notify: truewebhook fallback jobs →cron.webhookसेट होने पर उससे स्पष्ट webhook delivery; announce jobs अपनी chat delivery रखते हैं औरdelivery.completionDestinationपाते हैं। जबcron.webhookunset हो, तो no-target jobs के लिए निष्क्रिय शीर्ष-स्तरीयnotifymarker हटाया जाता है (मौजूदा delivery, announce सहित, सुरक्षित रहती है) क्योंकि runtime delivery इसे कभी नहीं पढ़ती
jobs.json से हटाने से पहले active store के बगल में jobs-quarantine.json में कॉपी किया जाता है; doctor quarantined rows की रिपोर्ट करता है ताकि आप उन्हें manually review या repair कर सकें।Gateway startup runtime projection को normalize करता है और शीर्ष-स्तरीय notify marker को ignore करता है, लेकिन doctor repair के लिए persisted cron config को छोड़ देता है। जब cron.webhook unset हो, तो doctor उन jobs के लिए inert marker हटाता है जिनका कोई migration target नहीं है (delivery.mode none/absent, unusable webhook target, या मौजूदा announce/chat delivery), existing delivery को अछूता छोड़ते हुए, ताकि बार-बार doctor --fix चलाने पर उसी job के बारे में फिर warning न आए। यदि cron.webhook set है लेकिन valid HTTP(S) URL नहीं है, तो doctor अभी भी warn करता है और marker छोड़ देता है ताकि आप URL ठीक कर सकें।Linux पर, doctor यह भी warn करता है जब user का crontab अभी भी legacy ~/.openclaw/bin/ensure-whatsapp.sh invoke करता है। यह host-local script वर्तमान OpenClaw द्वारा maintained नहीं है और जब cron systemd user bus तक नहीं पहुंच पाता तो ~/.openclaw/logs/whatsapp-health.log में false Gateway inactive messages लिख सकता है। stale crontab entry को crontab -e से हटाएं; current health checks के लिए openclaw channels status --probe, openclaw doctor, और openclaw gateway status का उपयोग करें।3c. session lock cleanup
3c. session lock cleanup
--fix / --repair mode में यह dead, orphaned, recycled, malformed-old, या non-OpenClaw owners वाले locks को automatically हटाता है। पुराने locks जो अभी भी live OpenClaw process के owned हैं, report किए जाते हैं लेकिन यथावत छोड़े जाते हैं ताकि doctor किसी active transcript writer को cut off न करे।3d. session transcript branch repair
3d. session transcript branch repair
--fix / --repair mode में, doctor प्रत्येक affected file का original के बगल में backup बनाता है और transcript को active branch में rewrite करता है ताकि gateway history और memory readers अब duplicate turns न देखें।4. State integrity checks (session persistence, routing, and safety)
4. State integrity checks (session persistence, routing, and safety)
- State dir missing: catastrophic state loss के बारे में warn करता है, directory को recreate करने के लिए prompt करता है, और याद दिलाता है कि यह missing data recover नहीं कर सकता।
- State dir permissions: writability verify करता है; permissions repair करने की पेशकश करता है (और owner/group mismatch detect होने पर
chownhint emit करता है)। - macOS cloud-synced state dir: जब state iCloud Drive (
~/Library/Mobile Documents/com~apple~CloudDocs/...) या~/Library/CloudStorage/...के अंतर्गत resolve होती है, तो warn करता है क्योंकि sync-backed paths धीमे I/O और lock/sync races पैदा कर सकते हैं। - Linux SD or eMMC state dir: जब state किसी
mmcblk*mount source पर resolve होती है, तो warn करता है, क्योंकि SD या eMMC-backed random I/O session और credential writes के तहत धीमा हो सकता है और जल्दी घिस सकता है। - Linux volatile state dir: जब state
tmpfsयाramfsपर resolve होती है, तो warn करता है, क्योंकि sessions, credentials, config, और SQLite state अपने WAL/journal sidecars सहित reboot पर गायब हो जाएंगे। Dockeroverlaymounts को जानबूझकर flag नहीं किया जाता क्योंकि उनकी writable layers host reboots के पार persist करती हैं जब तक container बना रहता है। - Session dirs missing: history persist करने और
ENOENTcrashes से बचने के लिएsessions/और session store directory required हैं। - Transcript mismatch: जब recent session entries में transcript files missing होती हैं, तो warn करता है।
- Main session “1-line JSONL”: जब main transcript में केवल एक line हो (history accumulate नहीं हो रही), तो flag करता है।
- Multiple state dirs: जब home directories में कई
~/.openclawfolders मौजूद हों याOPENCLAW_STATE_DIRकहीं और point करता हो, तो warn करता है (history installs के बीच split हो सकती है)। - Remote mode reminder: यदि
gateway.mode=remoteहै, तो doctor आपको इसे remote host पर चलाने की याद दिलाता है (state वहीं रहती है)। - Config file permissions: यदि
~/.openclaw/openclaw.jsongroup/world readable है, तो warn करता है और इसे600तक tighten करने की पेशकश करता है।
5. Model auth health (OAuth expiry)
5. Model auth health (OAuth expiry)
--non-interactive refresh attempts छोड़ देता है।जब OAuth refresh permanently fail होता है (उदाहरण के लिए refresh_token_reused, invalid_grant, या कोई provider आपको फिर से sign in करने को कहता है), तो doctor रिपोर्ट करता है कि re-auth required है और चलाने के लिए exact openclaw models auth login --provider ... command print करता है।Doctor उन auth profiles की भी report करता है जो अस्थायी रूप से unusable हैं, इनके कारण:- short cooldowns (rate limits/timeouts/auth failures)
- longer disables (billing/credit failures)
auth-profiles.json में migrate करने के लिए interactive terminal से एक बार openclaw doctor --fix चलाएं; उसके बाद, embedded turns (Telegram, cron, sub-agent dispatch) उन्हें canonical OpenAI OAuth profiles के रूप में resolve करते हैं।6. Hooks model validation
6. Hooks model validation
hooks.gmail.model set है, तो doctor model reference को catalog और allowlist के खिलाफ validate करता है और जब यह resolve नहीं होगा या disallowed होगा तो warn करता है।7. Sandbox image repair
7. Sandbox image repair
7b. Plugin install cleanup
7b. Plugin install cleanup
openclaw doctor --fix / openclaw doctor --repair mode में legacy OpenClaw-generated plugin dependency staging state हटाता है। इसमें stale generated dependency roots, पुराने install-stage directories, पहले के bundled-plugin dependency repair code से package-local debris, और bundled @openclaw/* plugins की orphaned या recovered managed npm copies शामिल हैं जो current bundled manifest को shadow कर सकती हैं। Doctor managed npm plugins में host openclaw package को भी relink करता है जो peerDependencies.openclaw declare करते हैं, ताकि openclaw/plugin-sdk/* जैसे package-local runtime imports updates या npm repairs के बाद resolve होते रहें।जब config downloadable plugins को reference करता है लेकिन local plugin registry उन्हें नहीं ढूंढ पाती, तो doctor missing downloadable plugins को reinstall भी कर सकता है। उदाहरणों में material plugins.entries, configured channel/provider/search settings, और configured agent runtimes शामिल हैं। Package updates के दौरान, doctor core package swap किए जाने पर package-manager plugin repair चलाने से बचता है; यदि configured plugin को अभी भी recovery चाहिए, तो update के बाद फिर से openclaw doctor --fix चलाएं। Gateway startup और config reload package managers नहीं चलाते; plugin installs explicit doctor/install/update work ही रहते हैं।8. Gateway service migrations and cleanup hints
8. Gateway service migrations and cleanup hints
openclaw gateway status --deep या openclaw doctor --deep से inspect करें, फिर duplicate हटाएं या जब कोई system supervisor gateway lifecycle own करता हो तो OPENCLAW_SERVICE_REPAIR_POLICY=external set करें।8b. Startup Matrix migration
8b. Startup Matrix migration
--fix / --repair mode में) pre-migration snapshot बनाता है और फिर best-effort migration steps चलाता है: legacy Matrix state migration और legacy encrypted-state preparation। दोनों steps non-fatal हैं; errors log किए जाते हैं और startup जारी रहता है। Read-only mode में (openclaw doctor बिना --fix) यह check पूरी तरह skipped होता है।8c. Device pairing and auth drift
8c. Device pairing and auth drift
- pending first-time pairing requests
- already paired devices के लिए pending role upgrades
- already paired devices के लिए pending scope upgrades
- public-key mismatch repairs जहां device id अभी भी match करती है लेकिन device identity अब approved record से match नहीं करती
- approved role के लिए active token missing वाले paired records
- paired tokens जिनके scopes approved pairing baseline से बाहर drift हो गए हैं
- current machine के लिए local cached device-token entries जो gateway-side token rotation से पहले की हैं या stale scope metadata carry करती हैं
- pending requests को
openclaw devices listसे inspect करें - exact request को
openclaw devices approve <requestId>से approve करें - fresh token को
openclaw devices rotate --device <deviceId> --role <role>से rotate करें - stale record को
openclaw devices remove <deviceId>से remove और re-approve करें
9. सुरक्षा चेतावनियां
9. सुरक्षा चेतावनियां
10. systemd linger (Linux)
10. systemd linger (Linux)
11. Workspace status (skills, plugins, and TaskFlows)
11. Workspace status (skills, plugins, and TaskFlows)
- Skills status: eligible, missing-requirements, और allowlist-blocked skills की गिनती करता है।
- Plugin status: enabled/disabled/errored plugins की गिनती करता है; किसी भी error के लिए plugin IDs list करता है; bundle plugin capabilities report करता है।
- Plugin compatibility warnings: उन plugins को flag करता है जिनमें current runtime के साथ compatibility issues हैं।
- Plugin diagnostics: plugin registry द्वारा emitted किसी भी load-time warnings या errors को surface करता है।
- TaskFlow recovery: suspicious managed TaskFlows को surface करता है जिन्हें manual inspection या cancellation की जरूरत है।
11b. Bootstrap file size
11b. Bootstrap file size
AGENTS.md, CLAUDE.md, या अन्य injected context files) configured character budget के करीब हैं या उससे ऊपर। यह per-file raw vs. injected character counts, truncation percentage, truncation cause (max/file या max/total), और total budget के fraction के रूप में total injected characters report करता है। जब files truncate होती हैं या limit के करीब होती हैं, तो doctor agents.defaults.bootstrapMaxChars और agents.defaults.bootstrapTotalMaxChars tune करने के लिए tips print करता है।11d. Stale channel plugin cleanup
11d. Stale channel plugin cleanup
openclaw doctor --fix कोई missing channel plugin हटाता है, तो यह उस plugin को reference करने वाला dangling channel-scoped config भी हटाता है: channels.<id> entries, channel का नाम लेने वाले heartbeat targets, और agents.*.models["<channel>/*"] overrides। यह उन Gateway boot loops को रोकता है जहां channel runtime gone है लेकिन config अभी भी Gateway से उसे bind करने को कहता है।11c. Shell completion
11c. Shell completion
- अगर shell profile slow dynamic completion pattern (
source <(openclaw completion ...)) का उपयोग करता है, तो doctor उसे faster cached file variant में upgrade करता है। - अगर completion profile में configured है लेकिन cache file missing है, तो doctor cache को automatically regenerate करता है।
- अगर कोई completion configured नहीं है, तो doctor उसे install करने के लिए prompt करता है (सिर्फ interactive mode;
--non-interactiveके साथ skip किया जाता है)।
openclaw completion --write-state चलाएं।12. Gateway auth checks (local token)
12. Gateway auth checks (local token)
- अगर token mode को token चाहिए और कोई token source मौजूद नहीं है, तो doctor एक token generate करने की पेशकश करता है।
- अगर
gateway.auth.tokenSecretRef-managed है लेकिन unavailable है, तो doctor चेतावनी देता है और इसे plaintext से overwrite नहीं करता। openclaw doctor --generate-gateway-tokengeneration को तभी force करता है जब कोई token SecretRef configured न हो।
12b. Read-only SecretRef-aware repairs
12b. Read-only SecretRef-aware repairs
openclaw doctor --fixअब targeted config repairs के लिए status-family commands जैसा ही read-only SecretRef summary model उपयोग करता है।- उदाहरण: Telegram
allowFrom/groupAllowFrom@usernamerepair available होने पर configured bot credentials का उपयोग करने की कोशिश करता है। - अगर Telegram bot token SecretRef के जरिए configured है लेकिन current command path में unavailable है, तो doctor report करता है कि credential configured-but-unavailable है और crash करने या token को missing बताने के बजाय auto-resolution skip करता है।
13. Gateway health check + restart
13. Gateway health check + restart
13b. Memory search readiness
13b. Memory search readiness
- QMD backend: probe करता है कि
qmdbinary available और startable है या नहीं। अगर नहीं, तो npm package और manual binary path option सहित fix guidance print करता है। - Explicit local provider: local model file या recognized remote/downloadable model URL की जांच करता है। missing होने पर remote provider पर switch करने का सुझाव देता है।
- Explicit remote provider (
openai,voyage, आदि): verify करता है कि API key environment या auth store में मौजूद है। missing होने पर actionable fix hints print करता है। - Legacy auto provider:
memorySearch.provider: "auto"को OpenAI की तरह treat करता है, OpenAI readiness जांचता है, औरdoctor --fixइसेprovider: "openai"में rewrite करता है।
openclaw memory status --deep उपयोग करें।14. Channel status warnings
14. Channel status warnings
15. Supervisor config audit + repair
15. Supervisor config audit + repair
openclaw doctorsupervisor config rewrite करने से पहले prompt करता है।openclaw doctor --yesdefault repair prompts accept करता है।openclaw doctor --fixprompts के बिना recommended fixes apply करता है (--repairएक alias है)।openclaw doctor --fix --forcecustom supervisor configs overwrite करता है।OPENCLAW_SERVICE_REPAIR_POLICY=externalgateway service lifecycle के लिए doctor को read-only रखता है। यह अभी भी service health report करता है और non-service repairs चलाता है, लेकिन service install/start/restart/bootstrap, supervisor config rewrites, और legacy service cleanup skip करता है क्योंकि वह lifecycle external supervisor own करता है।- Linux पर, matching systemd gateway unit active होने पर doctor command/entrypoint metadata rewrite नहीं करता। यह duplicate-service scan के दौरान inactive non-legacy extra gateway-like units को भी ignore करता है ताकि companion service files cleanup noise न बनाएं।
- अगर token auth को token चाहिए और
gateway.auth.tokenSecretRef-managed है, तो doctor service install/repair SecretRef validate करता है लेकिन resolved plaintext token values को supervisor service environment metadata में persist नहीं करता। - Doctor managed
.env/SecretRef-backed service environment values detect करता है जिन्हें पुराने LaunchAgent, systemd, या Windows Scheduled Task installs ने inline embed किया था, और service metadata rewrite करता है ताकि वे values supervisor definition के बजाय runtime source से load हों। - Doctor detect करता है जब service command
gateway.portबदलने के बाद भी पुराने--portको pin करता है और service metadata को current port में rewrite करता है। - अगर token auth को token चाहिए और configured token SecretRef unresolved है, तो doctor install/repair path को actionable guidance के साथ block करता है।
- अगर
gateway.auth.tokenऔरgateway.auth.passwordदोनों configured हैं औरgateway.auth.modeunset है, तो doctor mode explicitly set होने तक install/repair block करता है। - Linux user-systemd units के लिए, doctor token drift checks अब service auth metadata compare करते समय
Environment=औरEnvironmentFile=दोनों sources शामिल करते हैं। - Doctor service repairs किसी पुराने OpenClaw binary से Gateway service को rewrite, stop, या restart करने से मना करते हैं जब config last किसी newer version द्वारा लिखा गया था। Gateway troubleshooting देखें।
- आप हमेशा
openclaw gateway install --forceके जरिए full rewrite force कर सकते हैं।
16. Gateway runtime + port diagnostics
16. Gateway runtime + port diagnostics
18789) पर port collisions की भी जांच करता है और likely causes (Gateway already running, SSH tunnel) report करता है।17. Gateway runtime best practices
17. Gateway runtime best practices
nvm, fnm, volta, asdf, आदि) पर चलती है। WhatsApp + Telegram channels को Node चाहिए, और version-manager paths upgrades के बाद break हो सकते हैं क्योंकि service आपका shell init load नहीं करती। Doctor available होने पर system Node install (Homebrew/apt/choco) पर migrate करने की पेशकश करता है।Newly installed या repaired macOS LaunchAgents interactive shell PATH copy करने के बजाय canonical system PATH (/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin) का उपयोग करते हैं, ताकि Homebrew-managed system binaries available रहें जबकि Volta, asdf, fnm, pnpm, और अन्य version-manager directories यह न बदलें कि कौन से Node child processes resolve होते हैं। Linux services अभी भी explicit environment roots (NVM_DIR, FNM_DIR, VOLTA_HOME, ASDF_DATA_DIR, BUN_INSTALL, PNPM_HOME) और stable user-bin directories रखते हैं, लेकिन guessed version-manager fallback directories service PATH में तभी लिखी जाती हैं जब वे directories disk पर मौजूद हों।18. Config write + wizard metadata
18. Config write + wizard metadata
19. Workspace tips (backup + memory system)
19. Workspace tips (backup + memory system)