vercel-labs/channel-debug-core
Channel webhook triage for vercel-openclaw Slack/Telegram/Discord/WhatsApp issues: prove deployment state, collect admin readiness endpoints, build evidence-first handoff before fixes.
npx skills add https://github.com/vercel-labs/vercel-openclaw --skill channel-debug-core
Use this skill for any Slack, Telegram, Discord, or WhatsApp delivery issue.
Before proposing a fix, produce:
unknown, verified-good, or verified-bad.Do not write "most likely" twice. Gather direct evidence.
For live deployments, channel debugging starts with parallel lanes. The parent agent creates one artifact root and launches these lanes before any patch proposal:
| Lane | Agent role | Evidence focus |
|---|---|---|
| Vercel/app logs | channel_vercel_logs | Project targeting proof, deployment proof, admin readiness JSON, Vercel runtime logs, request/delivery correlation |
| Sandbox runtime | channel_sandbox_runtime | npx sandbox or app admin SSH fallback, process/port/config/log evidence |
| Workflow state | channel_workflow_state | Project targeting proof, npx workflow inspect runs --backend vercel, drain workflow state, fallback log correlation |
| Channel specialist | channel_<channel> | Channel route semantics, signatures/raw body, dedup, boot message, terminal-path audit |
No fix may be proposed until the merge gate is satisfied:
verified-bad.Before any vercel, npx sandbox, or npx workflow investigation, prove the command is targeting the intended Vercel project and team.
Always inspect .vercel/project.json and compare it to the incident target. If they differ, do not rely on inferred project context. Use explicit project/team/deployment targeting and record the mismatch in the handoff.
Known sharp edge: this repo may be linked to release 45 in .vercel/project.json (projectName: vercel-openclaw-45, projectId: prj_ag6Uzj9b4deNK98jVS5SO0H2Shmx). For release 46, use explicit target context (projectName: vercel-openclaw-46, projectId: prj_JSzrXyJiMzT6F7BUA76Naa7nkjRa, team vercel-internal-playground) rather than trusting .vercel inference.
If a tool prints that it inferred the project from .vercel, treat the output as suspect until the inferred project is proven to match the incident target. This is especially important for npx workflow, which can silently inspect the wrong project when run from a repo linked to a different release.
Collect these first:
GET /api/admin/why-not-ready
GET /api/channels/summary
GET /api/admin/sandbox-diag
GET /api/admin/logs
Save the raw JSON before continuing. Logs are a ring buffer and can evict important events.
Report these separately:
route-ready: platform route/native route appears registered.native-accepted: lastForward.ok true with classification:"accepted", or equivalent handler acceptance evidence.user-visible-reply: real user saw a Slack/Telegram/Discord/WhatsApp reply or status update.Never collapse these into connected.
Run or request equivalent evidence:
git rev-parse HEAD
git ls-remote origin main
curl "$URL/api/admin/sandbox-diag"
If the deployed runtime cannot be tied to the source being read, say so and stop code-level conclusions.
Write evidence under:
.agent-runs/channel-debug/<timestamp>/<channel>/
Do not commit runtime evidence. Redact admin secrets, bypass secrets, bot tokens, webhook secrets, and platform access tokens.
When the incident references a release-specific env file, such as .env.45, use it only to investigate that release's live run.
Allowed uses:
ADMIN_SECRETRules:
The sandbox lane must first identify the actual Vercel Sandbox runtime ID. Use /api/admin/sandbox-diag and /api/channels/summary before CLI access.
If the ID is oc-prj*, prj_*, OPENCLAW_INSTANCE_ID, or VERCEL_PROJECT_ID, do not pass it as <sandbox_id> to sandbox exec or sandbox connect.
When npx sandbox / sandbox works, collect read-only evidence:
sandbox exec "$SANDBOX_ID" sh -lc '
set -eu
echo "== process =="
ps -eo pid,ppid,comm,args | grep -E "[o]penclaw|[n]ode" || true
echo "== ports =="
(ss -ltnp || netstat -ltnp) 2>/dev/null | grep -E ":(3000|8787)\\b" || true
echo "== openclaw logs =="
tail -200 /tmp/openclaw/openclaw-*.log 2>/dev/null || true
'
For config, print only shape, never secrets:
sandbox exec "$SANDBOX_ID" node - <<'NODE'
const fs = require("fs");
const p = "/home/vercel-sandbox/.openclaw/openclaw.json";
const j = JSON.parse(fs.readFileSync(p, "utf8"));
console.log(JSON.stringify({
channels: Object.keys(j.channels || {}),
pluginAllow: j.plugins?.allow || null,
hasSlack: Boolean(j.channels?.slack),
hasTelegram: Boolean(j.channels?.telegram),
hasDiscord: Boolean(j.channels?.discord),
hasWhatsApp: Boolean(j.channels?.whatsapp),
}, null, 2));
NODE
If CLI access fails because the ID is incompatible or auth cannot resolve the sandbox, save the CLI failure and switch to the app admin SSH/exec fallback. The fallback must run the same read-only probes.
The workflow lane must inspect Vercel Workflow state before treating the workflow path as healthy or broken:
npx workflow inspect runs --backend vercel > "$ART/workflow/runs.txt" 2> "$ART/workflow/runs.stderr.txt"
Correlate by channel, incident time, request ID, delivery ID, platform event ID, and drainChannelWorkflow.
Collect workflow run ID, status, current/last step, retry count or repeated step evidence, terminal error, whether native forward attempts happened, and whether channels.forward_outcome was written.
If npx workflow is unavailable or cannot inspect Vercel state, save the failure and fall back to Vercel logs filtered to workflow/channel events, /api/admin/logs, and /api/channels/summary.lastForward. Do not use local workflow data as evidence for production behavior.
Before proposing a patch, compare current evidence to known prior fixes and failure signatures:
| Prior fix / failure mode | Current matching evidence | Current contradicting evidence | Match? |
|---|---|---|---|
| openclaw-42 zero-plugin gateway wedge | | | |
| stale sandbox public URL / sandbox-not-listening | | | |
| workflow retry exhaustion | | | |
| route-ready vs native-accepted mismatch | | | |
| recent accepted-forward override of stale configSync failure | | | |
| channel-specific signature/raw-body/secret issue | | | |
A repeated operator-facing message is not enough. Match on runtime signals: status codes, route probes, process/log evidence, Workflow state, and lastForward.
If you cannot call the deployed endpoints, produce a static code-path audit and mark runtime edges unknown. Do not claim runtime behavior from code alone.
Take vercel-labs/channel-debug-core from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npx.
Without those the skill loads but fails at the first command.