一键导入
debug
Debug nano-core agent runtime issues (Docker default, host opt-in). Use when agent execution fails, runtime checks fail, or onboarding/startup is blocked.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Debug nano-core agent runtime issues (Docker default, host opt-in). Use when agent execution fails, runtime checks fail, or onboarding/startup is blocked.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Map of the Tailscale network (tailnet) and how to reach, operate, and deploy to remote machines over it via SSH. Use for any cross-machine task — remote install, deploy, restart, log-check, or file transfer.
Operate nano-core coding delegation. Use for /coder or /coding execution, /coder-plan or /coder_plan planning, natural-language coding approval prompts, delegated runs, run IDs, progress, cancellation, and final-result handling; not for direct coding or automatic delegation.
Diagnose nano-core runtime failures. Use for provider/model errors, Pi launch or skill-discovery failures, Telegram/WhatsApp routing, singleton locks, service state, IPC, SQLite state, scheduler behavior, or per-group logs; not for installation or feature work.
Install or onboard nano-core on a host. Use for first-time installation, prerequisites, runtime selection, provider/channel configuration, daemon setup, upgrades, or doctor checks; not for diagnosing an already-running incident.
Understand and operate nano-core itself. Use for questions about nano-core architecture, behavior, configuration, capabilities, skills, installation, troubleshooting, Telegram administration, or coding delegation; route focused work to the matching nano-core skill.
Configure and operate nano-core through Telegram. Use for bot enablement, main/admin chat claims, trigger routing, command authorization, delivery modes, media intake, polling conflicts, and Telegram-first operation; not for WhatsApp-only or general runtime incidents.
| name | debug |
| description | Debug nano-core agent runtime issues (Docker default, host opt-in). Use when agent execution fails, runtime checks fail, or onboarding/startup is blocked. |
This guide covers host-side diagnosis for current runtime modes:
Host process (src/index.ts)
-> runtime selection (src/container-runtime.ts)
-> agent execution (src/container-runner.ts)
- Docker mode: docker run nano-core-agent:latest
- Host mode: node container/agent-runner/dist/index.js
| Log | Location | Purpose |
|---|---|---|
| App log | logs/nano-core.log | Router, scheduler, runtime orchestration |
| App error log | logs/nano-core.error.log | Host process failures |
| Runtime run log | groups/<folder>/logs/runtime-*.log | Per-run stdout/stderr, mounts, env diagnostics |
npm run typecheck
npm run build
node -e "import('./dist/container-runtime.js').then(m=>console.log(m.getContainerRuntime()))"
docker --version
docker info >/dev/null && echo "Docker OK" || echo "Docker NOT running"
grep -E '^(CONTAINER_RUNTIME|NANO_CORE_ALLOW_HOST_RUNTIME|NANO_CORE_ALLOW_HOST_RUNTIME_IN_PROD)=' .env || true
Host mode requires:
CONTAINER_RUNTIME=hostNANO_CORE_ALLOW_HOST_RUNTIME=1Production host mode additionally requires:
NANO_CORE_ALLOW_HOST_RUNTIME_IN_PROD=1Cause: .env contains an unsupported value.
Fix:
sed -i.bak 's/^CONTAINER_RUNTIME=.*/CONTAINER_RUNTIME=auto/' .env
Cause: Docker unavailable and host mode not explicitly allowed.
Fix options:
.env:CONTAINER_RUNTIME=host
NANO_CORE_ALLOW_HOST_RUNTIME=1
Check newest runtime log:
ls -t groups/*/logs/runtime-*.log | head -1 | xargs -I{} sh -lc 'echo "== {} =="; tail -120 "{}"'
Then validate credentials:
grep -E '^(CLAUDE_CODE_OAUTH_TOKEN|ANTHROPIC_API_KEY|PI_API|PI_MODEL|ZAI_API_KEY)=' .env
Verify per-group session mount path exists:
ls -la data/pi/main/.pi 2>/dev/null || true
Ensure runtime logs show expected mounted session directory and no permission errors.
echo '{}' | docker run -i --entrypoint /bin/echo nano-core-agent:latest "Container OK"
npm --prefix container/agent-runner run build
CONTAINER_RUNTIME=host NANO_CORE_ALLOW_HOST_RUNTIME=1 NANO_CORE_DRY_RUN=1 npm run dev
launchctl list | grep nano-core || true
launchctl kickstart -k gui/$(id -u)/com.nano-core
sleep 2
tail -80 logs/nano-core.log
echo "1) Node/build"
node --version
npm run -s build >/dev/null && echo "build OK" || echo "build FAIL"
echo "\n2) Docker"
docker info >/dev/null 2>&1 && echo "docker OK" || echo "docker NOT ready"
echo "\n3) Runtime policy"
grep -E '^(CONTAINER_RUNTIME|NANO_CORE_ALLOW_HOST_RUNTIME|NANO_CORE_ALLOW_HOST_RUNTIME_IN_PROD)=' .env || echo "no runtime env overrides"
echo "\n4) Latest runtime logs"
ls -t groups/*/logs/runtime-*.log 2>/dev/null | head -3 || echo "no runtime logs yet"
If issue persists, capture and share:
logs/nano-core.log tail (last 120 lines)groups/<folder>/logs/runtime-*.logdocker info (or host mode env flags).env runtime keys (redact secrets)