debugging-local-task-agent-runs
БесплатноБез исполняемых скриптовНе проверенDebug the output of local PostHog task runs: the wizard cloud-run path that executes inside a Docker sandbox under the local Temporal `process-task` workflow…
от PostHog★ 41 278 звёзд на GitHubОб этом скилле
Debugging local task/agent runs
A "cloud run" of the Tasks product (e.g. the setup-wizard cloud_run endpoint) executes as the Temporal process-task workflow on the development-task-queue. Locally (SANDBOX_PROVIDER=docker) each run gets a Docker sandbox container in which two things happen in sequence:
run_wizardactivity — runs the published@posthog/wizardto integrate PostHog (writes/tmp/posthog-wizard.log).agent-server— the coding agent that commits the wizard's changes, opens the PR, and keeps it green (writes/tmp/agent-server.log).
The hard part of debugging is that the Temporal UI doesn't show this output — workflow result/failure payloads are binary/encrypted, and the activity captures the wizard/agent output to the run's logs, not to the timeline. This skill is how you actually read it.
Prerequisites: env for local cloud runs
Cloud runs only work locally if all of these are set in .env.local (values shown are the local targets — never commit real secrets). Inside the Docker sandbox, localhost is the container itself, so PostHog URLs use host.docker.internal.
| Key | Purpose / local value |
|---|---|
SANDBOX_PROVIDER |
"docker" — route sandboxes to local Docker instead of Modal |
SANDBOX_MCP_URL |
"http://host.docker.internal:8787/mcp" — MCP server the agent uses |
SANDBOX_AI_GATEWAY_URL |
"http://host.docker.internal:8080": local Go AI gateway the agent routes model calls through |
SANDBOX_AI_GATEWAY_WORKER_URL |
"http://localhost:8080": the same gateway as the Tasks worker reaches it, for token minting |
SANDBOX_AI_GATEWAY_PRODUCTS |
comma-separated ai_product values to route; must list the run's product or the run fails to start |
SANDBOX_AI_GATEWAY_MINT_KEY |
the dev phs_ key that bin/setup-gateway-e2e mints (DEV_GATEWAY_PHS); the worker mints run tokens |
SANDBOX_JWT_PRIVATE_KEY |
signs the scoped sandbox tokens |
GITHUB_APP_CLIENT_ID |
your local GitHub App (clone + PR) |
GITHUB_APP_CLIENT_SECRET |
"" |
GITHUB_APP_SLUG |
"" |
GITHUB_APP_PRIVATE_KEY |
"" |
Two non-env requirements, or the keys above are inert:
- The Go AI gateway must actually be running on
:8080. Enable theai_gatewaycapability so theai-gatewayproc runsbin/start-ai-gateway. It needs a sibling clone ofPostHog/ai-gateway(default~/Development/ai-gateway) and its own provider keys.SANDBOX_AI_GATEWAY_URLpointing at a dead port yieldsConnectionRefusedfrom the agent. - The wizard OAuth app must exist —
bin/ensure-local-setupprovisions it and setsWIZARD_CLOUD_RUN_OAUTH_CLIENT_ID; without it thecloud_runendpoint returns 404 "not available".
After editing .env.local, restart the stack — env is read at process start, not hot-reloaded.
Step 1 — find the task UUID
You need the task UUID for the container, and sometimes the run UUID for the durable log. The workflow id encodes both: task-processing-<task_id>-<run_id>.
Fastest (no Temporal needed — the sandbox container name carries the task UUID):
docker ps --format '{{.Names}}' | grep task-sandbox
# task-sandbox-<TASK_ID>-<suffix>
From the Temporal CLI (lists running/recent process-task workflows with both UUIDs):
docker exec posthog-temporal-admin-tools-1 \
temporal workflow list --address temporal:7233 --namespace default --limit 10 \
| grep process-task
# task-processing-<TASK_ID>-<RUN_ID> process-task Running
From the Temporal UI — http://localhost:8081, open the process-task workflow; the id in the URL is task-processing-<TASK_ID>-<RUN_ID>.
Step 2 — tail live logs inside the sandbox (while it's running)
The wizard and agent write line-by-line to files in the container as they run, so this is the only way to watch progress live (the activity buffers stdout and only flushes to the durable log when it finishes).
TASK_ID=<task-uuid-from-step-1>
CID=$(docker ps -q --filter "name=task-sandbox-$TASK_ID")
docker exec "$CID" tail -f /tmp/posthog-wizard.log # wizard stage (full agent SDK detail)
do
Установить debugging-local-task-agent-runs в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл debugging-local-task-agent-runs?
Debug the output of local PostHog task runs: the wizard cloud-run path that executes inside a Docker sandbox under the local Temporal `process-task` workflow (the wizard that integrates PostHog, then the coding agent that commits and opens the PR). Use when a local run looks stuck, failed, or silent, or when you need to read the wizard or agent logs. Covers the `.env.local` keys and the `ai_gateway` capability required for cloud runs locally, finding the task UUID (docker ps, temporal CLI, Temporal UI at localhost:8081), tailing live logs inside the sandbox container (`/tmp/posthog-wizard.log`, `/tmp/agent-server.log`), and reading the durable per-run console log from object storage after the sandbox is torn down. Trigger terms: task-sandbox, run_wizard, agent-server, process-task, SANDBOX_PROVIDER, AI_GATEWAY, cloud_run, posthog-wizard.log.
Как установить скилл debugging-local-task-agent-runs?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл debugging-local-task-agent-runs запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic