一键导入
troubleshoot
Debug DashClaw errors, signal issues, and misconfigurations
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Debug DashClaw errors, signal issues, and misconfigurations
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | troubleshoot |
| description | Debug DashClaw errors, signal issues, and misconfigurations |
| license | MIT |
| metadata | {"author":"ucsandman","version":"1.0.0","category":"debugging"} |
Systematic diagnostics for common DashClaw errors, signal anomalies, and configuration issues.
Symptom: API calls return 401.
Checklist:
x-api-key header is set (not Authorization: Bearer)DASHCLAW_API_KEY environment variable is setcurl -H "x-api-key: $DASHCLAW_API_KEY" $DASHCLAW_BASE_URL/api/health
Root cause: DashClaw uses x-api-key header, not Bearer tokens. The middleware does timing-safe comparison first, then falls back to hash lookup.
Symptom: API calls return 403.
Checklist:
DASHCLAW_MODE env var./api/guard and getting 403, a policy is blocking the action — this is working as intended.org_default org blocks API access except onboarding routes. Create a real org first.Symptom: API calls return 429 Too Many Requests.
Defaults:
Fixes:
DASHCLAW_DISABLE_RATE_LIMIT=true for local developmentUPSTASH_REDIS_REST_URL for distributed rate limitingSymptom: API calls return 503.
Checklist:
DASHCLAW_API_KEY set? Missing key → 503 on protected routesDATABASE_URL valid? Check connection stringcurl $DASHCLAW_BASE_URL/api/health/setup page for readiness verification| Gotcha | Explanation |
|---|---|
| Client-sent org headers stripped | Middleware ALWAYS strips x-org-id, x-org-role, x-user-id from requests. Org context comes from the API key, never the client. |
| Two thread systems | Context threads (ct_*) and message threads (mt_*) are separate systems. Don't mix them. |
| org_default blocks APIs | Users in org_default are blocked from most endpoints. Create or join a real org first. |
| API key shown once | Keys are displayed exactly once at creation. If lost, generate a new one. |
| 2MB body size limit | Request bodies larger than 2MB are rejected. |
| HTTPS required in production | Non-HTTPS connections are rejected in production mode. |
| Canonical JSON for signatures | Agent identity signatures require deterministic JSON key ordering. |
| Rate limiting is per-IP | Not per-key or per-agent. Multiple agents on same IP share the limit. |
DashClaw computes 8 signal types. If signals are firing unexpectedly:
Trigger: >10 ungoverned actions/hour
Fix: Add guard checks before actions. Use claw.guard() before claw.createAction().
Trigger: Irreversible decisions with risk ≥70 and no approval Fix: Add approval gate policy for high-risk irreversible actions.
Trigger: >3 failures in 24 hours Fix: Check agent logic. Review failed actions in dashboard for patterns.
Trigger: Unresolved dependencies >48 hours old
Fix: Resolve or cancel open loops: claw.resolveOpenLoop(loopId, 'resolved', 'Fixed').
Trigger: ≥2 invalidated assumptions in 7 days Fix: Review assumptions. Agent may be operating on stale beliefs.
Trigger: Unvalidated assumptions >14 days old
Fix: Validate or invalidate old assumptions: claw.validateAssumption(id, true/false, reason).
Trigger: Actions with status running for >1 hour
Fix: Two layers of cleanup:
# Preview what would change
node scripts/_run-with-env.mjs scripts/repair-stale-running-actions.mjs --dry-run --older-than-hours 1
# Apply (status='completed' with "Auto-closed" summary; preserves error_message → 'failed')
node scripts/_run-with-env.mjs scripts/repair-stale-running-actions.mjs --older-than-hours 1
dashclaw_stop.py (Stop hook). At turn end it queries each open action and PATCHes status='completed' only when the action is still running. Terminal statuses written by PostToolUse are preserved. See setup-dashclaw skill.For ad-hoc closure of a single action: claw.updateOutcome(actionId, { status: 'failed', output_summary: 'Timed out' }).
Trigger: Agent heartbeat lost >10 minutes
Fix: Ensure agent sends heartbeats: claw.heartbeat({ status: 'online' }).
curl -sf "$DASHCLAW_BASE_URL/api/health" | jq '.'
Returns {status, version, checks: {database, runtime, realtime, ...}}. Anything other than status: "healthy" points at the failing check.
node scripts/doctor.mjs
Audits the local config — env vars, DB connectivity, schema state, generated artifact freshness.
# Node — guard → createAction → updateOutcome against the live instance
node scripts/_run-with-env.mjs scripts/test-sdk-live.mjs
# Python equivalent
node scripts/_run-with-env.mjs scripts/run-sdk-live-python.mjs
Both scripts emit a real action that you should see appear on /decisions within seconds. If the round-trip fails, the error pinpoints the layer (HTTP, validation, DB).
npm run startup:smoke
Boots Next.js, hits the critical routes, and reports which (if any) fail to respond.
.claude/settings.json has PreToolUse hook configuredBash|Edit|Write|MultiEditpython --versionDASHCLAW_HOOK_MODE — if set to observe, it logs but never blocksDASHCLAW_RISK_THRESHOLD — default is 60, lower it to catch morecurl -H "x-api-key: $KEY" $URL/api/policiesDASHCLAW_HOOK_MODE=observe first to understand what's being caught{tempdir}/dashclaw_last_action_{tool_use_id}DASHCLAW_BASE_URL and DASHCLAW_API_KEY are set for posttool.claude/settings.json has the Stop block (one entry, no matcher needed). If missing, re-run node /path/to/DashClaw/scripts/install-hooks.mjs --target=..ls /tmp/dashclaw_turn_<session_id> (Linux/macOS) or dir %TEMP%\dashclaw_turn_<session_id> (Windows). After Stop fires, that file is deleted and /tmp/dashclaw_stop_cursor_<session_id> appears.echo '{"session_id":"<your-session-id>","transcript_path":"<path/to/.jsonl>"}' \
| python .claude/hooks/dashclaw_stop.py; echo "exit=$?"
Then query the DB for any action_id from that session — tokens_in, tokens_out, model, cost_estimate should be populated.PATCH /api/actions/:id accepts token fields by checking the deployed server version: curl -sf $DASHCLAW_BASE_URL/api/health | jq '.version' should be ≥ 2.13.1. Older deploys silently drop tokens_in/tokens_out.status='running' at turn end. Without it, every interrupted/abandoned tool stays open forever.node scripts/_run-with-env.mjs scripts/repair-stale-running-actions.mjs --older-than-hours 1 (preview with --dry-run first).Governance behavior for AI agents governed by DashClaw. Teaches the governance protocol: when to call guard (risk thresholds), how to interpret decisions (allow/warn/block/require_approval), when to record actions, how to wait for approvals, and session lifecycle management. Loads org-specific policies and capabilities from MCP resources at session start. Use with @dashclaw/mcp-server. Trigger on: governed agent, dashclaw governance, guard policy, approval wait, governed capability, risk threshold, action recording, session lifecycle.
DashClaw platform expert for integration, troubleshooting, and governance. Snapshot-based — prefer live queries via `python -m livingcode query`, or `GET {baseUrl}/api/doctor` when Python/livingcode/the repo are unavailable.
Human-in-the-loop approval workflows for governed agent actions
Set up a DashClaw instance, install the CLI tool, and configure Claude Code hooks