.agents/skills/openclaw-debugging/SKILL.md
Use this skill when OpenClaw behavior differs between local tests, live models, providers, code mode, Tool Search, Crabbox, or CI, and the next move should be a debug signal rather than a guess.
docs/logging.md for log files, openclaw logs, and targeted debug flags.docs/reference/test.md for local test commands.docs/reference/code-mode.md for code-mode exec/wait and tool catalog rules.$openclaw-testing for choosing test lanes.$crabbox for broad, Docker, package, Linux, live-key, or CI-parity proof.Use targeted env flags instead of global debug when the model request shape or stream timing matters:
OPENCLAW_DEBUG_MODEL_TRANSPORT=1 openclaw gateway
OPENCLAW_DEBUG_MODEL_PAYLOAD=tools OPENCLAW_DEBUG_SSE=events openclaw gateway
OPENCLAW_DEBUG_MODEL_PAYLOAD=full-redacted OPENCLAW_DEBUG_SSE=peek openclaw gateway
Useful flags:
OPENCLAW_DEBUG_MODEL_TRANSPORT=1: request start, fetch response, SDK
headers, first SSE event, stream done, and transport errors at info.OPENCLAW_DEBUG_MODEL_PAYLOAD=summary: bounded payload summary.OPENCLAW_DEBUG_MODEL_PAYLOAD=tools: all model-facing tool names.OPENCLAW_DEBUG_MODEL_PAYLOAD=full-redacted: capped, redacted JSON payload.
Use only while debugging; prompts/message text may still appear.OPENCLAW_DEBUG_SSE=events: first-event and stream-completion timing.OPENCLAW_DEBUG_SSE=peek: first five redacted SSE events.OPENCLAW_DEBUG_CODE_MODE=1: code-mode tool-surface diagnostics.Watch logs with:
openclaw logs --follow
exec and wait only after it
actually activates.pnpm build when touching workers, dynamic imports,
package exports, lazy runtime boundaries, or published paths.~/.profile for key presence/length before saying
live proof is blocked. Never print secrets.src/agents/openai-transport-stream.tssrc/agents/provider-transport-fetch.tssrc/agents/pi-embedded-runner/openai-stream-wrappers.tssrc/agents/pi-embedded-runner/run/attempt.tssrc/agents/code-mode.ts
src/agents/code-mode.worker.tssrc/agents/tool-search.tspnpm check:docs and git diff --check.pnpm build.$crabbox.Report: