openclaw-debugging
Skill573 starsChanged 35 days agoMITView on GitHub
Debug OpenClaw model, provider, tool-surface, code-mode, streaming, and live/Crabbox behavior by choosing the right logs, probes, and proof path before changing code, including fetching stored sessions, transcripts, and attachments as evidence.
13 other projects use a version of this, 9 of them edited.
Adopted by
Most recently taken up by
- shanselman/openclaw-windows-hubtheir own version, first seen Nov 2, 2026
- openclaw/openclaw-windows-nodetheir own version, first seen Nov 1, 2026
- OpenClawAndroid/openclaw-android-assistantword for word, first seen Oct 17, 2026
- bighamx/openclaw-android-node-apkedited, first seen Oct 9, 2026
- molt-bot/clawdbotword for word, first seen Oct 8, 2026
- steipete/warelayedited, first seen Oct 8, 2026
Used with
Projects with it also use openclaw-performance, plugin-sdk-impact and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
clawdbotSkillopenclaw-performance
Performance work in OpenClaw: a slow or heavy flow (latency, CPU, memory, SQL, RPC, renders), writing or reviewing a perf PR, or adding a cache. Count the work, delete waste first, cache last.
Also in 7 projects that use this
clawdbotSkillplugin-sdk-impact
Count Plugin SDK consumers across live ClawHub releases and bundled OpenClaw plugins before deprecation, removal, or behavior changes; supports public release-date filters.
Also in 7 projects that use this
- +1 more from clawdbot
Other versions13 projects use a version of this.
Word for word · 2
- molt-bot/clawdbot★ 391k100% same
- OpenClawAndroid/openclaw-android-assistant★ 556100% same
Edited · 9
- moltbot/clawdbot★ 394k57% same
- steipete/warelay★ 394k57% same
- steipete/clawdis★ 394k57% same
- moltbot/moltbot★ 394k57% same
- clawdbot/clawdbot★ 394k57% same
- openclaw/openclaw★ 394k57% same
- bighamx/openclaw-android-node-apk★ 5757% same
- clawsouls/soulclaw★ 995% same
- supermansuper563-ops/openclaw-workbench★ 098% same
Wrote their own version · 2
- openclaw/openclaw-windows-node★ 2.2ksame name
- shanselman/openclaw-windows-hub★ 2.2ksame name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository107 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- extensions/AGENTS.mdAGENTS.md
- openclaw-android/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- test/AGENTS.mdAGENTS.md
- ui/AGENTS.mdAGENTS.md
- agent-transcriptSkill
- auto-qaSkill
- autoreviewSkill
- channel-message-flowsSkill
- clawdtributorSkill
- claw-scoreSkill
- clawsweeperSkill
- codex-app-paritySkill
- control-ui-e2eSkill
- crabboxSkill
- deslopSkill
- discord-clawdSkill
- discord-e2eSkill
- discord-user-postSkill
- discrawlSkill
- gitcrawlSkill
- graincrawlSkill
- notcrawlSkill
- openclaw-changelog-updateSkill
- openclaw-ci-limitsSkill
- openclaw-docker-e2e-authoringSkill
- openclaw-ghsa-maintainerSkill
- openclaw-live-updaterSkill
- openclaw-parallels-smokeSkill
- openclaw-pr-maintainerSkill
- openclaw-qa-testingSkill
- openclaw-refactor-docsSkill
- openclaw-release-validationSkill
- openclaw-repair-sweepSkill
- openclaw-secret-scanning-maintainerSkill
- openclaw-test-heap-leaksSkill
- openclaw-testingSkill
- openclaw-test-performanceSkill
- openclaw-updateSkill
- parallels-discord-roundtripSkill
- proof-videoSkill
- prototype-openclaw-tuiSkill
- release-openclaw-announcementSkill
- release-openclaw-ciSkill
- release-openclaw-macSkill
- release-openclaw-maintainerSkill
- release-openclaw-plugin-testingSkill
- security-triageSkill
- slack-e2eSkill
- slacrawlSkill
- tag-duplicate-prs-issuesSkill
- technical-documentationSkill
- telegram-e2e-userbotSkill
- test-auditSkill
- update-team-serverSkill
- verify-releaseSkill
- 1passwordSkill
- apple-notesSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
10 rules. 1 is common, 5 are distinctive, and 4 are very specific to this project.
1
Common
Most of the 11 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill when OpenClaw behavior differs between local tests, live models, providers, code mode, Tool Search, Crabbox, or CI, and the …
- Very specific: line 17
Use $openclaw-testing for choosing test lanes.
- Very specific: line 18
Use $crabbox for broad, Docker, package, Linux, live-key, or CI-parity proof.
- Distinctive: line 24
Add or enable the narrowest signal that proves that boundary.
- Distinctive: line 33
Use targeted env flags instead of global debug when the model request shape or stream timing matters:
- Common: line 49
Use only while debugging; prompts/message text may still appear.
- Very specific: line 74
Worker/dist: run pnpm build when touching workers, dynamic imports, package exports, lazy runtime boundaries, or published paths.
- Distinctive: line 76
Live keys: use the configured secret workflow for missing provider keys before saying live proof is blocked.
- Distinctive: line 82
Use these paths when a bug report references a chat session and you need the actual transcript, sender attribution, or attachments as …
- Very specific: line 136
Always open live stores readOnly: true.
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
OpenClaw Debugging
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.
Read First
docs/logging.mdfor log files,openclaw logs, and targeted debug flags.docs/reference/test.mdfor local test commands.docs/tools/code-mode.mdfor code-mode exec/wait and tool catalog rules.- Use
$openclaw-testingfor choosing test lanes. - Use
$crabboxfor broad, Docker, package, Linux, live-key, or CI-parity proof.
Default Loop
- State the suspected boundary: config, tool construction, provider payload, fetch, stream/SSE, transcript replay, worker/runtime, package/dist, or CI.
- Add or enable the narrowest signal that proves that boundary.
- Reproduce with the same provider/model/config. Do not randomly switch models unless the model itself is the variable being tested.
- Compare configured state with actual run activation.
- Patch the root cause.
- Rerun the exact failing probe, then broaden only if the contract requires it.
Model Transport Logs
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 gatewayUseful flags:
OPENCLAW_DEBUG_MODEL_TRANSPORT=1: request start, fetch response, SDK headers, first SSE event, stream done, and transport errors atinfo.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 --followCommon Boundaries
- Config vs activation: config can be enabled while the run disables tools, is raw, has an empty allowlist, or lacks model tool support. Check the actual visible tools before enforcing provider payload invariants.
- Tool surface: inspect final model-visible tool names, not only the tool
registry or config. Code mode means exactly
execandwaitonly after it actually activates. - Provider payload: log fields, model id, service tier, reasoning, input size, metadata keys, prompt-cache key presence, and tool names before SDK call.
- Fetch vs SSE: fetch response proves HTTP headers arrived; first SSE event proves provider body progress. A gap here is a stream/body/provider issue, not tool execution.
- Worker/dist: run
pnpm buildwhen touching workers, dynamic imports, package exports, lazy runtime boundaries, or published paths. - Live keys: use the configured secret workflow for missing provider keys before saying live proof is blocked. Env checks are presence-only; never print secrets.
Fetching Sessions and Transcripts
Use these paths when a bug report references a chat session and you need the actual transcript, sender attribution, or attachments as evidence.
CLI first (needs a configured install; safe against a live gateway):
openclaw sessions list --agent <agentId> --json
openclaw sessions tail
openclaw sessions export-trajectoryDocs: docs/reference/database-schemas.md for the store layout,
https://docs.openclaw.ai/cli/sessions for the CLI.
Raw store (when the CLI is unavailable, e.g. inspecting a remote host over SSH, or you need event-level detail):
- Per-agent data plane:
~/.openclaw/agents/<agentId>/agent/openclaw-agent.sqlite. Canonical schema:src/state/openclaw-agent-schema.sql. - Hosted/systemd installs keep state under the service user's home (e.g.
/home/openclaw/.openclaw/...), not root's — root may carry a separate stray install with different agents. If the expected agent dir is missing, locate the real DB:find / -maxdepth 6 -name openclaw-agent.sqlite. - Web chat URLs end in a session-id fragment:
/chat/<agentId>/<slug>-<hex>. Resolve it insession_nodes:session_key LIKE '%<hex>%'→current_session_id,display_name. Key shape isagent:<agentId>:<surface>:<uuid>; subagent sessions use surfacesubagent. - Transcript:
transcript_events(session_id,seq,event_json).event_json.messagehasrole(user/assistant/toolResult) andcontent(string, or parts of typetext/toolCall/image). - Sender provenance: real user messages carry
message.__openclaw(senderId,senderName,senderIsOwner); runtime-synthesized inputs do not. Use this to separate operator-authored text from injected prompts. - Full-text search across transcripts:
session_transcript_fts. - Attachments:
media://inbound/<file>URLs map to<state-dir>/media/inbound/<file>. - User-attached images are not
imagecontent parts. They ride the message envelope:message.__openclaw.media[]entries withurl(media://inbound/<file>),contentType,kind,fileName. A parts-only extractor misses every image — grep rawevent_jsonformedia://. On a remote host, scp the files locally (one remote path per scp argument) and read them there.
Hosts without a sqlite3 binary still have Node: node:sqlite needs no
dependencies.
node -e 'const {DatabaseSync}=require("node:sqlite");
const db=new DatabaseSync(process.argv[1],{readOnly:true});
console.log(JSON.stringify(db.prepare(
"SELECT seq,event_json FROM transcript_events WHERE session_id=? ORDER BY seq"
).all(process.argv[2])))' <db-path> <session-id>Always open live stores readOnly: true; never write a running gateway's
state (see Validation rules in the root AGENTS.md). For realistic-data
work, copy the DB into a dev state dir first.
Code Pointers
- Model payload + Responses stream:
src/agents/openai-transport-stream.ts - Guarded fetch/timing:
src/agents/provider-transport-fetch.ts - OpenAI/Codex provider wrappers:
src/llm/providers/stream-wrappers/openai.ts - Tool construction, Tool Search, code-mode activation:
src/agents/embedded-agent-runner/run/attempt.ts - Code-mode runtime and worker:
src/agents/code-mode.tssrc/agents/code-mode.worker.ts - Tool Search catalog:
src/agents/tool-search.ts
Proof Choice
- Single helper/payload bug: local targeted Vitest.
- Docs/logging-only:
pnpm check:docsandgit diff --check. - Worker/dist/lazy import/package surface: targeted tests plus
pnpm build. - Live provider/model behavior: same provider/model with debug flags and a real key if available.
- Docker/package/Linux/CI-parity: current dedicated Linux worker when capable;
otherwise
$crabbox. - CI failure: exact SHA, relevant job only, logs only after failure/completion.
Output Habit
Report:
- boundary tested
- exact command/env shape, redacted
- observed signal, such as tool names or first SSE event timing
- fix location
- narrow proof and any remaining risk
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

