[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-posthog-debugging-signals-pipeline":3,"mdc--78du4a-key":41,"related-repo-posthog-debugging-signals-pipeline":2325,"related-org-posthog-debugging-signals-pipeline":2445},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":26,"repoUrl":27,"updatedAt":28,"license":29,"forks":30,"topics":31,"repo":36,"sourceUrl":39,"mdContent":40},"debugging-signals-pipeline","debug PostHog signals pipeline","Debug the signals pipeline locally end-to-end. Covers emitting test signals from fixtures, monitoring Temporal workflows via the REST API, reading sandbox agent logs from object storage, inspecting Docker sandbox containers, and diagnosing common failures (stale ClickHouse embeddings, agentsh network denials, inactivity timeouts). Use when a signal isn't reaching the inbox, a signal-report-summary workflow fails, or a sandbox task run times out.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"posthog","PostHog","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fposthog.png",[12,16,17,20,23],{"name":13,"slug":14,"type":15},"Observability","observability","tag",{"name":9,"slug":8,"type":15},{"name":18,"slug":19,"type":15},"Data Pipeline","data-pipeline",{"name":21,"slug":22,"type":15},"Engineering","engineering",{"name":24,"slug":25,"type":15},"Debugging","debugging",59,"https:\u002F\u002Fgithub.com\u002FPostHog\u002Fai-plugin","2026-06-05T07:40:53.882356",null,11,[32,33,34,35],"claude-code-plugin","codex-plugin","cursor-plugin","gemini-cli-extension",{"repoUrl":27,"stars":26,"forks":30,"topics":37,"description":38},[32,33,34,35],"Official PostHog plugin for Claude Code, Cursor, Gemini, Codex and other AI coding tools","https:\u002F\u002Fgithub.com\u002FPostHog\u002Fai-plugin\u002Ftree\u002FHEAD\u002Fskills\u002Fdebugging-signals-pipeline","---\nname: debugging-signals-pipeline\ndescription: >\n  Debug the signals pipeline locally end-to-end. Covers emitting test signals\n  from fixtures, monitoring Temporal workflows via the REST API, reading sandbox\n  agent logs from object storage, inspecting Docker sandbox containers, and\n  diagnosing common failures (stale ClickHouse embeddings, agentsh network\n  denials, inactivity timeouts). Use when a signal isn't reaching the inbox,\n  a signal-report-summary workflow fails, or a sandbox task run times out.\n---\n\n# Debugging the signals pipeline\n\n## Pipeline flow\n\n```text\nemit_signals_from_fixture\n  → signal-emitter (Temporal workflow)\n    → buffer-signals (batches signals, 5s flush timer)\n      → safety_filter_activity\n      → flush_signals_to_s3_activity\n      → signal_with_start_grouping_v2_activity\n        → team-signal-grouping-v2 (30s batch collect window)\n          → read_signals_from_s3_activity\n          → get_embedding_activity + generate_search_queries_activity\n          → run_signal_semantic_search_activity\n          → match_signal_to_report_activity\n          → assign_and_emit_signal_activity\n          → wait_for_signal_in_clickhouse_activity\n          → (if new report) signal-report-summary\n            → fetch_signals_for_report_activity\n            → report_safety_judge_activity\n            → select_repository_activity (spawns Docker sandbox)\n```\n\n## Emitting test signals\n\n```bash\n# Emit a single signal from the Zendesk fixture at offset 26\nDEBUG=1 python manage.py emit_signals_from_fixture --type zendesk --team-id 1 --offset 26 --limit 1\n\n# Clean up all signal data before re-emitting (avoids stale matches)\nDEBUG=1 python manage.py cleanup_signals --team-id 1 --yes\n\n# Check pipeline status\npython manage.py signal_pipeline_status --team-id 1 --wait --expected-signals 1 --poll-interval 10\n```\n\nAlways clean up before re-emitting to avoid stale embeddings causing phantom report matches.\n\n## Monitoring Temporal workflows\n\nThe Temporal UI runs at `http:\u002F\u002Flocalhost:8081`. The REST API is useful for scripted inspection.\n\n### List recent workflows\n\n```bash\ncurl -s 'http:\u002F\u002Flocalhost:8081\u002Fapi\u002Fv1\u002Fnamespaces\u002Fdefault\u002Fworkflows?query=ORDER+BY+StartTime+DESC&maximumPageSize=15' \\\n  | python3 -c \"\nimport sys, json\nfor wf in json.load(sys.stdin).get('executions', []):\n    info = wf['execution']\n    status = wf['status'].replace('WORKFLOW_EXECUTION_STATUS_', '')\n    print(f'{wf[\\\"startTime\\\"][:19]}  {status:20s} {wf[\\\"type\\\"][\\\"name\\\"]:35s} {info[\\\"workflowId\\\"][:90]}')\n\"\n```\n\n### Inspect workflow history\n\n```bash\nWF_ID=\"buffer-signals-1\"  # or team-signal-grouping-v2-1, signals-report:1:\u003Cuuid>\ncurl -s \"http:\u002F\u002Flocalhost:8081\u002Fapi\u002Fv1\u002Fnamespaces\u002Fdefault\u002Fworkflows\u002F$WF_ID\u002Fhistory?maximumPageSize=200\" \\\n  | python3 -c \"\nimport sys, json\nfor event in json.load(sys.stdin).get('history', {}).get('events', []):\n    etype = event['eventType'].replace('EVENT_TYPE_', '')\n    etime = event['eventTime'][:19]\n    details = ''\n    for key, attrs in event.items():\n        if key.endswith('Attributes') and isinstance(attrs, dict):\n            if 'activityType' in attrs: details = attrs['activityType'].get('name', '')\n            elif 'signalName' in attrs: details = f'signal: {attrs[\\\"signalName\\\"]}'\n            elif 'startToFireTimeout' in attrs: details = f'timer: {attrs[\\\"startToFireTimeout\\\"]}'\n            elif 'failure' in attrs: details = f'FAILED: {attrs[\\\"failure\\\"].get(\\\"message\\\", \\\"\\\")[:200]}'\n    if details: print(f'  {etime}  {etype:50s} {details}')\n\"\n```\n\n### Inspect a previous run (continued-as-new)\n\nWhen a workflow has continued-as-new, use the `execution.runId` query param:\n\n```bash\ncurl -s \"http:\u002F\u002Flocalhost:8081\u002Fapi\u002Fv1\u002Fnamespaces\u002Fdefault\u002Fworkflows\u002F$WF_ID\u002Fhistory?execution.runId=\u003Crun-id>&maximumPageSize=200\"\n```\n\n## Reading sandbox agent logs\n\nAgent logs are stored in object storage (MinIO locally) as JSONL files.\nThe log URL is on the `TaskRun` model.\n\n```python\n# In Django shell (python manage.py shell)\nfrom products.tasks.backend.models import TaskRun\nfrom posthog.storage import object_storage\n\n# Find the most recent task run\nrun = TaskRun.objects.order_by(\"-created_at\").first()\nprint(f\"status: {run.status}, error: {run.error_message}\")\nprint(f\"log_url: {run.log_url}\")\n\n# Read the log\ncontent = object_storage.read(run.log_url, missing_ok=True)\n\n# Print last 3000 chars (most useful — shows what happened before failure)\nprint(content[-3000:])\n```\n\nThe log is JSONL with entries like:\n\n```json\n{\n  \"type\": \"notification\",\n  \"timestamp\": \"...\",\n  \"notification\": { \"jsonrpc\": \"2.0\", \"method\": \"_posthog\u002Fconsole\", \"params\": { \"level\": \"debug\", \"message\": \"...\" } }\n}\n```\n\nKey things to look for in the log tail:\n\n- **agentsh network events** — `DENY` entries show blocked network calls\n- **`_posthog\u002Fprogress`** events — show which setup step the sandbox reached\n- **`_posthog\u002Fconsole`** debug messages — show sandbox provisioning, cloning, agent startup\n\n## Inspecting Docker sandbox containers\n\n```bash\n# List running sandbox containers\ndocker ps --filter \"name=task-sandbox\" --format \"table {{.Names}}\\t{{.Status}}\\t{{.Image}}\"\n\n# See processes inside a running sandbox\ndocker exec \u003Ccontainer-name> ps aux\n\n# Read the agent-server log inside the container (while it's still running)\ndocker exec \u003Ccontainer-name> cat \u002Ftmp\u002Fagent-server.log\n```\n\nThe container is named `task-sandbox-\u003Ctask-id>-\u003Crandom>` and uses the `posthog-sandbox-base` image.\nContainers are ephemeral — they're removed after the task run completes, so inspect while running.\n\n## Common failures\n\n### `SignalReport matching query does not exist`\n\nThe `assign_and_emit_signal_activity` tried to assign a signal to a report that doesn't exist.\nUsually caused by stale embeddings in ClickHouse after a `cleanup_signals` that failed to delete them.\n\n**Root cause:** `CLICKHOUSE_DATABASE` not set in `.env`. The cleanup command uses `sync_execute`\nwhich connects to the `CLICKHOUSE_DATABASE` (defaults to `default`), but the embedding tables\nlive in the `posthog` database.\n\n**Fix:** Add `CLICKHOUSE_DATABASE=posthog` to `.env` and restart workers.\n\n**Manual cleanup of stale embeddings:**\n\n```bash\ncurl -s 'http:\u002F\u002Flocalhost:8123\u002F' --data-binary \\\n  \"ALTER TABLE posthog.sharded_posthog_document_embeddings_text_embedding_3_small_1536 DELETE WHERE product = 'signals' AND team_id = 1 SETTINGS mutations_sync = 1\"\n```\n\n**Verify embeddings are clean:**\n\n```bash\ncurl -s 'http:\u002F\u002Flocalhost:8123\u002F' --data-binary \\\n  \"SELECT count() FROM posthog.sharded_posthog_document_embeddings_text_embedding_3_small_1536 WHERE team_id = 1 AND product = 'signals'\"\n```\n\n### `Run timed out due to inactivity` on `select_repository_activity`\n\nThe sandbox Claude agent went idle for longer than `TASKS_INACTIVITY_TIMEOUT_SECONDS`. When unset\nthis falls back to a 2 hour timeout — set `TASKS_INACTIVITY_TIMEOUT_SECONDS=30` locally to force fast failures.\n\n**Diagnosing:** Read the agent log from object storage (see above). Check the tail for:\n\n1. **agentsh network denials** — `DENY host.docker.internal` means the MCP server URL is blocked\n   by the sandbox network policy. The `SIGNALS_REPO_DISCOVERY` environment's domain allowlist\n   doesn't include `host.docker.internal`.\n2. **No log content at all** — sandbox failed to start, check Docker container logs.\n3. **Claude API errors** — check if `ANTHROPIC_API_KEY` is valid.\n\n### `buffer-signals` sits idle, never receives signals\n\nThe `signal-emitter` completed but `buffer-signals` never got the `submit_signal`.\nThis happens when the emitter sent the signal to a previous buffer run that then continued-as-new,\nand the new run started fresh without the pending signal. Re-emit the signal.\n\n### ClickHouse embedding tables \"not found\" during cleanup\n\nThe tables exist in the `posthog` database but `sync_execute` queries the `default` database.\n\n```bash\n# Verify tables exist\ncurl -s 'http:\u002F\u002Flocalhost:8123\u002F' --data-binary \"SHOW TABLES FROM posthog LIKE '%embed%'\"\n\n# Check current CLICKHOUSE_DATABASE setting\ngrep CLICKHOUSE_DATABASE .env\n```\n\n## Useful management commands\n\n| Command                                            | Purpose                                        |\n| -------------------------------------------------- | ---------------------------------------------- |\n| `emit_signals_from_fixture`                        | Emit test signals from JSON fixtures           |\n| `DEBUG=1 cleanup_signals --team-id N --yes`        | Delete all signal data and terminate workflows |\n| `signal_pipeline_status --team-id N --wait`        | Wait for pipeline to finish processing         |\n| `list_signal_reports --team-id N --signals --json` | Inspect grouping results                       |\n| `ingest_signals_json \u003Cfile> --team-id N`           | Ingest pre-processed signals from JSON         |\n| `ingest_report_json \u003Cfile> --team-id N`            | Seed a pre-researched report (skip sandbox)    |\n\n## Key file locations\n\n- Pipeline workflow definitions: `products\u002Fsignals\u002Fbackend\u002Ftemporal\u002F`\n- Buffer workflow: `products\u002Fsignals\u002Fbackend\u002Ftemporal\u002Fbuffer.py`\n- Grouping workflow: `products\u002Fsignals\u002Fbackend\u002Ftemporal\u002Fgrouping_v2.py`\n- Report summary workflow: `products\u002Fsignals\u002Fbackend\u002Ftemporal\u002Fsummary.py`\n- Docker sandbox implementation: `products\u002Ftasks\u002Fbackend\u002Flogic\u002Fservices\u002Fdocker_sandbox.py`\n- Sandbox Dockerfiles: `products\u002Ftasks\u002Fbackend\u002Fsandbox\u002Fimages\u002F`\n- Agent log polling: `products\u002Ftasks\u002Fbackend\u002Flogic\u002Fservices\u002Fcustom_prompt_internals.py`\n- Cleanup command: `products\u002Fsignals\u002Fbackend\u002Fmanagement\u002Fcommands\u002Fcleanup_signals.py`\n- Management command docs: `products\u002Fsignals\u002Fbackend\u002Fmanagement\u002FCLAUDE.md`\n",{"data":42,"body":43},{"name":4,"description":6},{"type":44,"children":45},"root",[46,55,62,75,81,309,315,321,334,341,525,531,817,823,836,875,881,894,1011,1016,1304,1309,1360,1366,1538,1559,1565,1575,1596,1652,1677,1685,1741,1749,1803,1821,1842,1852,1917,1929,1956,1962,1987,2075,2081,2211,2217,2319],{"type":47,"tag":48,"props":49,"children":51},"element","h1",{"id":50},"debugging-the-signals-pipeline",[52],{"type":53,"value":54},"text","Debugging the signals pipeline",{"type":47,"tag":56,"props":57,"children":59},"h2",{"id":58},"pipeline-flow",[60],{"type":53,"value":61},"Pipeline flow",{"type":47,"tag":63,"props":64,"children":69},"pre",{"className":65,"code":67,"language":53,"meta":68},[66],"language-text","emit_signals_from_fixture\n  → signal-emitter (Temporal workflow)\n    → buffer-signals (batches signals, 5s flush timer)\n      → safety_filter_activity\n      → flush_signals_to_s3_activity\n      → signal_with_start_grouping_v2_activity\n        → team-signal-grouping-v2 (30s batch collect window)\n          → read_signals_from_s3_activity\n          → get_embedding_activity + generate_search_queries_activity\n          → run_signal_semantic_search_activity\n          → match_signal_to_report_activity\n          → assign_and_emit_signal_activity\n          → wait_for_signal_in_clickhouse_activity\n          → (if new report) signal-report-summary\n            → fetch_signals_for_report_activity\n            → report_safety_judge_activity\n            → select_repository_activity (spawns Docker sandbox)\n","",[70],{"type":47,"tag":71,"props":72,"children":73},"code",{"__ignoreMap":68},[74],{"type":53,"value":67},{"type":47,"tag":56,"props":76,"children":78},{"id":77},"emitting-test-signals",[79],{"type":53,"value":80},"Emitting test signals",{"type":47,"tag":63,"props":82,"children":86},{"className":83,"code":84,"language":85,"meta":68,"style":68},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# Emit a single signal from the Zendesk fixture at offset 26\nDEBUG=1 python manage.py emit_signals_from_fixture --type zendesk --team-id 1 --offset 26 --limit 1\n\n# Clean up all signal data before re-emitting (avoids stale matches)\nDEBUG=1 python manage.py cleanup_signals --team-id 1 --yes\n\n# Check pipeline status\npython manage.py signal_pipeline_status --team-id 1 --wait --expected-signals 1 --poll-interval 10\n","bash",[87],{"type":47,"tag":71,"props":88,"children":89},{"__ignoreMap":68},[90,102,181,191,200,242,250,259],{"type":47,"tag":91,"props":92,"children":95},"span",{"class":93,"line":94},"line",1,[96],{"type":47,"tag":91,"props":97,"children":99},{"style":98},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[100],{"type":53,"value":101},"# Emit a single signal from the Zendesk fixture at offset 26\n",{"type":47,"tag":91,"props":103,"children":105},{"class":93,"line":104},2,[106,112,118,124,130,135,140,145,150,155,161,166,171,176],{"type":47,"tag":91,"props":107,"children":109},{"style":108},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[110],{"type":53,"value":111},"DEBUG",{"type":47,"tag":91,"props":113,"children":115},{"style":114},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[116],{"type":53,"value":117},"=",{"type":47,"tag":91,"props":119,"children":121},{"style":120},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[122],{"type":53,"value":123},"1",{"type":47,"tag":91,"props":125,"children":127},{"style":126},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[128],{"type":53,"value":129}," python",{"type":47,"tag":91,"props":131,"children":132},{"style":120},[133],{"type":53,"value":134}," manage.py",{"type":47,"tag":91,"props":136,"children":137},{"style":120},[138],{"type":53,"value":139}," emit_signals_from_fixture",{"type":47,"tag":91,"props":141,"children":142},{"style":120},[143],{"type":53,"value":144}," --type",{"type":47,"tag":91,"props":146,"children":147},{"style":120},[148],{"type":53,"value":149}," zendesk",{"type":47,"tag":91,"props":151,"children":152},{"style":120},[153],{"type":53,"value":154}," --team-id",{"type":47,"tag":91,"props":156,"children":158},{"style":157},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[159],{"type":53,"value":160}," 1",{"type":47,"tag":91,"props":162,"children":163},{"style":120},[164],{"type":53,"value":165}," --offset",{"type":47,"tag":91,"props":167,"children":168},{"style":157},[169],{"type":53,"value":170}," 26",{"type":47,"tag":91,"props":172,"children":173},{"style":120},[174],{"type":53,"value":175}," --limit",{"type":47,"tag":91,"props":177,"children":178},{"style":157},[179],{"type":53,"value":180}," 1\n",{"type":47,"tag":91,"props":182,"children":184},{"class":93,"line":183},3,[185],{"type":47,"tag":91,"props":186,"children":188},{"emptyLinePlaceholder":187},true,[189],{"type":53,"value":190},"\n",{"type":47,"tag":91,"props":192,"children":194},{"class":93,"line":193},4,[195],{"type":47,"tag":91,"props":196,"children":197},{"style":98},[198],{"type":53,"value":199},"# Clean up all signal data before re-emitting (avoids stale matches)\n",{"type":47,"tag":91,"props":201,"children":203},{"class":93,"line":202},5,[204,208,212,216,220,224,229,233,237],{"type":47,"tag":91,"props":205,"children":206},{"style":108},[207],{"type":53,"value":111},{"type":47,"tag":91,"props":209,"children":210},{"style":114},[211],{"type":53,"value":117},{"type":47,"tag":91,"props":213,"children":214},{"style":120},[215],{"type":53,"value":123},{"type":47,"tag":91,"props":217,"children":218},{"style":126},[219],{"type":53,"value":129},{"type":47,"tag":91,"props":221,"children":222},{"style":120},[223],{"type":53,"value":134},{"type":47,"tag":91,"props":225,"children":226},{"style":120},[227],{"type":53,"value":228}," cleanup_signals",{"type":47,"tag":91,"props":230,"children":231},{"style":120},[232],{"type":53,"value":154},{"type":47,"tag":91,"props":234,"children":235},{"style":157},[236],{"type":53,"value":160},{"type":47,"tag":91,"props":238,"children":239},{"style":120},[240],{"type":53,"value":241}," --yes\n",{"type":47,"tag":91,"props":243,"children":245},{"class":93,"line":244},6,[246],{"type":47,"tag":91,"props":247,"children":248},{"emptyLinePlaceholder":187},[249],{"type":53,"value":190},{"type":47,"tag":91,"props":251,"children":253},{"class":93,"line":252},7,[254],{"type":47,"tag":91,"props":255,"children":256},{"style":98},[257],{"type":53,"value":258},"# Check pipeline status\n",{"type":47,"tag":91,"props":260,"children":262},{"class":93,"line":261},8,[263,268,272,277,281,285,290,295,299,304],{"type":47,"tag":91,"props":264,"children":265},{"style":126},[266],{"type":53,"value":267},"python",{"type":47,"tag":91,"props":269,"children":270},{"style":120},[271],{"type":53,"value":134},{"type":47,"tag":91,"props":273,"children":274},{"style":120},[275],{"type":53,"value":276}," signal_pipeline_status",{"type":47,"tag":91,"props":278,"children":279},{"style":120},[280],{"type":53,"value":154},{"type":47,"tag":91,"props":282,"children":283},{"style":157},[284],{"type":53,"value":160},{"type":47,"tag":91,"props":286,"children":287},{"style":120},[288],{"type":53,"value":289}," --wait",{"type":47,"tag":91,"props":291,"children":292},{"style":120},[293],{"type":53,"value":294}," --expected-signals",{"type":47,"tag":91,"props":296,"children":297},{"style":157},[298],{"type":53,"value":160},{"type":47,"tag":91,"props":300,"children":301},{"style":120},[302],{"type":53,"value":303}," --poll-interval",{"type":47,"tag":91,"props":305,"children":306},{"style":157},[307],{"type":53,"value":308}," 10\n",{"type":47,"tag":310,"props":311,"children":312},"p",{},[313],{"type":53,"value":314},"Always clean up before re-emitting to avoid stale embeddings causing phantom report matches.",{"type":47,"tag":56,"props":316,"children":318},{"id":317},"monitoring-temporal-workflows",[319],{"type":53,"value":320},"Monitoring Temporal workflows",{"type":47,"tag":310,"props":322,"children":323},{},[324,326,332],{"type":53,"value":325},"The Temporal UI runs at ",{"type":47,"tag":71,"props":327,"children":329},{"className":328},[],[330],{"type":53,"value":331},"http:\u002F\u002Flocalhost:8081",{"type":53,"value":333},". The REST API is useful for scripted inspection.",{"type":47,"tag":335,"props":336,"children":338},"h3",{"id":337},"list-recent-workflows",[339],{"type":53,"value":340},"List recent workflows",{"type":47,"tag":63,"props":342,"children":344},{"className":83,"code":343,"language":85,"meta":68,"style":68},"curl -s 'http:\u002F\u002Flocalhost:8081\u002Fapi\u002Fv1\u002Fnamespaces\u002Fdefault\u002Fworkflows?query=ORDER+BY+StartTime+DESC&maximumPageSize=15' \\\n  | python3 -c \"\nimport sys, json\nfor wf in json.load(sys.stdin).get('executions', []):\n    info = wf['execution']\n    status = wf['status'].replace('WORKFLOW_EXECUTION_STATUS_', '')\n    print(f'{wf[\\\"startTime\\\"][:19]}  {status:20s} {wf[\\\"type\\\"][\\\"name\\\"]:35s} {info[\\\"workflowId\\\"][:90]}')\n\"\n",[345],{"type":47,"tag":71,"props":346,"children":347},{"__ignoreMap":68},[348,381,404,412,420,428,436,517],{"type":47,"tag":91,"props":349,"children":350},{"class":93,"line":94},[351,356,361,366,371,376],{"type":47,"tag":91,"props":352,"children":353},{"style":126},[354],{"type":53,"value":355},"curl",{"type":47,"tag":91,"props":357,"children":358},{"style":120},[359],{"type":53,"value":360}," -s",{"type":47,"tag":91,"props":362,"children":363},{"style":114},[364],{"type":53,"value":365}," '",{"type":47,"tag":91,"props":367,"children":368},{"style":120},[369],{"type":53,"value":370},"http:\u002F\u002Flocalhost:8081\u002Fapi\u002Fv1\u002Fnamespaces\u002Fdefault\u002Fworkflows?query=ORDER+BY+StartTime+DESC&maximumPageSize=15",{"type":47,"tag":91,"props":372,"children":373},{"style":114},[374],{"type":53,"value":375},"'",{"type":47,"tag":91,"props":377,"children":378},{"style":108},[379],{"type":53,"value":380}," \\\n",{"type":47,"tag":91,"props":382,"children":383},{"class":93,"line":104},[384,389,394,399],{"type":47,"tag":91,"props":385,"children":386},{"style":114},[387],{"type":53,"value":388},"  |",{"type":47,"tag":91,"props":390,"children":391},{"style":126},[392],{"type":53,"value":393}," python3",{"type":47,"tag":91,"props":395,"children":396},{"style":120},[397],{"type":53,"value":398}," -c",{"type":47,"tag":91,"props":400,"children":401},{"style":114},[402],{"type":53,"value":403}," \"\n",{"type":47,"tag":91,"props":405,"children":406},{"class":93,"line":183},[407],{"type":47,"tag":91,"props":408,"children":409},{"style":120},[410],{"type":53,"value":411},"import sys, json\n",{"type":47,"tag":91,"props":413,"children":414},{"class":93,"line":193},[415],{"type":47,"tag":91,"props":416,"children":417},{"style":120},[418],{"type":53,"value":419},"for wf in json.load(sys.stdin).get('executions', []):\n",{"type":47,"tag":91,"props":421,"children":422},{"class":93,"line":202},[423],{"type":47,"tag":91,"props":424,"children":425},{"style":120},[426],{"type":53,"value":427},"    info = wf['execution']\n",{"type":47,"tag":91,"props":429,"children":430},{"class":93,"line":244},[431],{"type":47,"tag":91,"props":432,"children":433},{"style":120},[434],{"type":53,"value":435},"    status = wf['status'].replace('WORKFLOW_EXECUTION_STATUS_', '')\n",{"type":47,"tag":91,"props":437,"children":438},{"class":93,"line":252},[439,444,449,454,458,463,467,472,476,481,485,490,494,499,503,508,512],{"type":47,"tag":91,"props":440,"children":441},{"style":120},[442],{"type":53,"value":443},"    print(f'{wf[",{"type":47,"tag":91,"props":445,"children":446},{"style":108},[447],{"type":53,"value":448},"\\\"",{"type":47,"tag":91,"props":450,"children":451},{"style":120},[452],{"type":53,"value":453},"startTime",{"type":47,"tag":91,"props":455,"children":456},{"style":108},[457],{"type":53,"value":448},{"type":47,"tag":91,"props":459,"children":460},{"style":120},[461],{"type":53,"value":462},"][:19]}  {status:20s} {wf[",{"type":47,"tag":91,"props":464,"children":465},{"style":108},[466],{"type":53,"value":448},{"type":47,"tag":91,"props":468,"children":469},{"style":120},[470],{"type":53,"value":471},"type",{"type":47,"tag":91,"props":473,"children":474},{"style":108},[475],{"type":53,"value":448},{"type":47,"tag":91,"props":477,"children":478},{"style":120},[479],{"type":53,"value":480},"][",{"type":47,"tag":91,"props":482,"children":483},{"style":108},[484],{"type":53,"value":448},{"type":47,"tag":91,"props":486,"children":487},{"style":120},[488],{"type":53,"value":489},"name",{"type":47,"tag":91,"props":491,"children":492},{"style":108},[493],{"type":53,"value":448},{"type":47,"tag":91,"props":495,"children":496},{"style":120},[497],{"type":53,"value":498},"]:35s} {info[",{"type":47,"tag":91,"props":500,"children":501},{"style":108},[502],{"type":53,"value":448},{"type":47,"tag":91,"props":504,"children":505},{"style":120},[506],{"type":53,"value":507},"workflowId",{"type":47,"tag":91,"props":509,"children":510},{"style":108},[511],{"type":53,"value":448},{"type":47,"tag":91,"props":513,"children":514},{"style":120},[515],{"type":53,"value":516},"][:90]}')\n",{"type":47,"tag":91,"props":518,"children":519},{"class":93,"line":261},[520],{"type":47,"tag":91,"props":521,"children":522},{"style":114},[523],{"type":53,"value":524},"\"\n",{"type":47,"tag":335,"props":526,"children":528},{"id":527},"inspect-workflow-history",[529],{"type":53,"value":530},"Inspect workflow history",{"type":47,"tag":63,"props":532,"children":534},{"className":83,"code":533,"language":85,"meta":68,"style":68},"WF_ID=\"buffer-signals-1\"  # or team-signal-grouping-v2-1, signals-report:1:\u003Cuuid>\ncurl -s \"http:\u002F\u002Flocalhost:8081\u002Fapi\u002Fv1\u002Fnamespaces\u002Fdefault\u002Fworkflows\u002F$WF_ID\u002Fhistory?maximumPageSize=200\" \\\n  | python3 -c \"\nimport sys, json\nfor event in json.load(sys.stdin).get('history', {}).get('events', []):\n    etype = event['eventType'].replace('EVENT_TYPE_', '')\n    etime = event['eventTime'][:19]\n    details = ''\n    for key, attrs in event.items():\n        if key.endswith('Attributes') and isinstance(attrs, dict):\n            if 'activityType' in attrs: details = attrs['activityType'].get('name', '')\n            elif 'signalName' in attrs: details = f'signal: {attrs[\\\"signalName\\\"]}'\n            elif 'startToFireTimeout' in attrs: details = f'timer: {attrs[\\\"startToFireTimeout\\\"]}'\n            elif 'failure' in attrs: details = f'FAILED: {attrs[\\\"failure\\\"].get(\\\"message\\\", \\\"\\\")[:200]}'\n    if details: print(f'  {etime}  {etype:50s} {details}')\n\"\n",[535],{"type":47,"tag":71,"props":536,"children":537},{"__ignoreMap":68},[538,569,608,627,634,642,650,658,666,675,684,692,719,745,800,809],{"type":47,"tag":91,"props":539,"children":540},{"class":93,"line":94},[541,546,550,555,560,564],{"type":47,"tag":91,"props":542,"children":543},{"style":108},[544],{"type":53,"value":545},"WF_ID",{"type":47,"tag":91,"props":547,"children":548},{"style":114},[549],{"type":53,"value":117},{"type":47,"tag":91,"props":551,"children":552},{"style":114},[553],{"type":53,"value":554},"\"",{"type":47,"tag":91,"props":556,"children":557},{"style":120},[558],{"type":53,"value":559},"buffer-signals-1",{"type":47,"tag":91,"props":561,"children":562},{"style":114},[563],{"type":53,"value":554},{"type":47,"tag":91,"props":565,"children":566},{"style":98},[567],{"type":53,"value":568},"  # or team-signal-grouping-v2-1, signals-report:1:\u003Cuuid>\n",{"type":47,"tag":91,"props":570,"children":571},{"class":93,"line":104},[572,576,580,585,590,595,600,604],{"type":47,"tag":91,"props":573,"children":574},{"style":126},[575],{"type":53,"value":355},{"type":47,"tag":91,"props":577,"children":578},{"style":120},[579],{"type":53,"value":360},{"type":47,"tag":91,"props":581,"children":582},{"style":114},[583],{"type":53,"value":584}," \"",{"type":47,"tag":91,"props":586,"children":587},{"style":120},[588],{"type":53,"value":589},"http:\u002F\u002Flocalhost:8081\u002Fapi\u002Fv1\u002Fnamespaces\u002Fdefault\u002Fworkflows\u002F",{"type":47,"tag":91,"props":591,"children":592},{"style":108},[593],{"type":53,"value":594},"$WF_ID",{"type":47,"tag":91,"props":596,"children":597},{"style":120},[598],{"type":53,"value":599},"\u002Fhistory?maximumPageSize=200",{"type":47,"tag":91,"props":601,"children":602},{"style":114},[603],{"type":53,"value":554},{"type":47,"tag":91,"props":605,"children":606},{"style":108},[607],{"type":53,"value":380},{"type":47,"tag":91,"props":609,"children":610},{"class":93,"line":183},[611,615,619,623],{"type":47,"tag":91,"props":612,"children":613},{"style":114},[614],{"type":53,"value":388},{"type":47,"tag":91,"props":616,"children":617},{"style":126},[618],{"type":53,"value":393},{"type":47,"tag":91,"props":620,"children":621},{"style":120},[622],{"type":53,"value":398},{"type":47,"tag":91,"props":624,"children":625},{"style":114},[626],{"type":53,"value":403},{"type":47,"tag":91,"props":628,"children":629},{"class":93,"line":193},[630],{"type":47,"tag":91,"props":631,"children":632},{"style":120},[633],{"type":53,"value":411},{"type":47,"tag":91,"props":635,"children":636},{"class":93,"line":202},[637],{"type":47,"tag":91,"props":638,"children":639},{"style":120},[640],{"type":53,"value":641},"for event in json.load(sys.stdin).get('history', {}).get('events', []):\n",{"type":47,"tag":91,"props":643,"children":644},{"class":93,"line":244},[645],{"type":47,"tag":91,"props":646,"children":647},{"style":120},[648],{"type":53,"value":649},"    etype = event['eventType'].replace('EVENT_TYPE_', '')\n",{"type":47,"tag":91,"props":651,"children":652},{"class":93,"line":252},[653],{"type":47,"tag":91,"props":654,"children":655},{"style":120},[656],{"type":53,"value":657},"    etime = event['eventTime'][:19]\n",{"type":47,"tag":91,"props":659,"children":660},{"class":93,"line":261},[661],{"type":47,"tag":91,"props":662,"children":663},{"style":120},[664],{"type":53,"value":665},"    details = ''\n",{"type":47,"tag":91,"props":667,"children":669},{"class":93,"line":668},9,[670],{"type":47,"tag":91,"props":671,"children":672},{"style":120},[673],{"type":53,"value":674},"    for key, attrs in event.items():\n",{"type":47,"tag":91,"props":676,"children":678},{"class":93,"line":677},10,[679],{"type":47,"tag":91,"props":680,"children":681},{"style":120},[682],{"type":53,"value":683},"        if key.endswith('Attributes') and isinstance(attrs, dict):\n",{"type":47,"tag":91,"props":685,"children":686},{"class":93,"line":30},[687],{"type":47,"tag":91,"props":688,"children":689},{"style":120},[690],{"type":53,"value":691},"            if 'activityType' in attrs: details = attrs['activityType'].get('name', '')\n",{"type":47,"tag":91,"props":693,"children":695},{"class":93,"line":694},12,[696,701,705,710,714],{"type":47,"tag":91,"props":697,"children":698},{"style":120},[699],{"type":53,"value":700},"            elif 'signalName' in attrs: details = f'signal: {attrs[",{"type":47,"tag":91,"props":702,"children":703},{"style":108},[704],{"type":53,"value":448},{"type":47,"tag":91,"props":706,"children":707},{"style":120},[708],{"type":53,"value":709},"signalName",{"type":47,"tag":91,"props":711,"children":712},{"style":108},[713],{"type":53,"value":448},{"type":47,"tag":91,"props":715,"children":716},{"style":120},[717],{"type":53,"value":718},"]}'\n",{"type":47,"tag":91,"props":720,"children":722},{"class":93,"line":721},13,[723,728,732,737,741],{"type":47,"tag":91,"props":724,"children":725},{"style":120},[726],{"type":53,"value":727},"            elif 'startToFireTimeout' in attrs: details = f'timer: {attrs[",{"type":47,"tag":91,"props":729,"children":730},{"style":108},[731],{"type":53,"value":448},{"type":47,"tag":91,"props":733,"children":734},{"style":120},[735],{"type":53,"value":736},"startToFireTimeout",{"type":47,"tag":91,"props":738,"children":739},{"style":108},[740],{"type":53,"value":448},{"type":47,"tag":91,"props":742,"children":743},{"style":120},[744],{"type":53,"value":718},{"type":47,"tag":91,"props":746,"children":748},{"class":93,"line":747},14,[749,754,758,763,767,772,776,781,785,790,795],{"type":47,"tag":91,"props":750,"children":751},{"style":120},[752],{"type":53,"value":753},"            elif 'failure' in attrs: details = f'FAILED: {attrs[",{"type":47,"tag":91,"props":755,"children":756},{"style":108},[757],{"type":53,"value":448},{"type":47,"tag":91,"props":759,"children":760},{"style":120},[761],{"type":53,"value":762},"failure",{"type":47,"tag":91,"props":764,"children":765},{"style":108},[766],{"type":53,"value":448},{"type":47,"tag":91,"props":768,"children":769},{"style":120},[770],{"type":53,"value":771},"].get(",{"type":47,"tag":91,"props":773,"children":774},{"style":108},[775],{"type":53,"value":448},{"type":47,"tag":91,"props":777,"children":778},{"style":120},[779],{"type":53,"value":780},"message",{"type":47,"tag":91,"props":782,"children":783},{"style":108},[784],{"type":53,"value":448},{"type":47,"tag":91,"props":786,"children":787},{"style":120},[788],{"type":53,"value":789},", ",{"type":47,"tag":91,"props":791,"children":792},{"style":108},[793],{"type":53,"value":794},"\\\"\\\"",{"type":47,"tag":91,"props":796,"children":797},{"style":120},[798],{"type":53,"value":799},")[:200]}'\n",{"type":47,"tag":91,"props":801,"children":803},{"class":93,"line":802},15,[804],{"type":47,"tag":91,"props":805,"children":806},{"style":120},[807],{"type":53,"value":808},"    if details: print(f'  {etime}  {etype:50s} {details}')\n",{"type":47,"tag":91,"props":810,"children":812},{"class":93,"line":811},16,[813],{"type":47,"tag":91,"props":814,"children":815},{"style":114},[816],{"type":53,"value":524},{"type":47,"tag":335,"props":818,"children":820},{"id":819},"inspect-a-previous-run-continued-as-new",[821],{"type":53,"value":822},"Inspect a previous run (continued-as-new)",{"type":47,"tag":310,"props":824,"children":825},{},[826,828,834],{"type":53,"value":827},"When a workflow has continued-as-new, use the ",{"type":47,"tag":71,"props":829,"children":831},{"className":830},[],[832],{"type":53,"value":833},"execution.runId",{"type":53,"value":835}," query param:",{"type":47,"tag":63,"props":837,"children":839},{"className":83,"code":838,"language":85,"meta":68,"style":68},"curl -s \"http:\u002F\u002Flocalhost:8081\u002Fapi\u002Fv1\u002Fnamespaces\u002Fdefault\u002Fworkflows\u002F$WF_ID\u002Fhistory?execution.runId=\u003Crun-id>&maximumPageSize=200\"\n",[840],{"type":47,"tag":71,"props":841,"children":842},{"__ignoreMap":68},[843],{"type":47,"tag":91,"props":844,"children":845},{"class":93,"line":94},[846,850,854,858,862,866,871],{"type":47,"tag":91,"props":847,"children":848},{"style":126},[849],{"type":53,"value":355},{"type":47,"tag":91,"props":851,"children":852},{"style":120},[853],{"type":53,"value":360},{"type":47,"tag":91,"props":855,"children":856},{"style":114},[857],{"type":53,"value":584},{"type":47,"tag":91,"props":859,"children":860},{"style":120},[861],{"type":53,"value":589},{"type":47,"tag":91,"props":863,"children":864},{"style":108},[865],{"type":53,"value":594},{"type":47,"tag":91,"props":867,"children":868},{"style":120},[869],{"type":53,"value":870},"\u002Fhistory?execution.runId=\u003Crun-id>&maximumPageSize=200",{"type":47,"tag":91,"props":872,"children":873},{"style":114},[874],{"type":53,"value":524},{"type":47,"tag":56,"props":876,"children":878},{"id":877},"reading-sandbox-agent-logs",[879],{"type":53,"value":880},"Reading sandbox agent logs",{"type":47,"tag":310,"props":882,"children":883},{},[884,886,892],{"type":53,"value":885},"Agent logs are stored in object storage (MinIO locally) as JSONL files.\nThe log URL is on the ",{"type":47,"tag":71,"props":887,"children":889},{"className":888},[],[890],{"type":53,"value":891},"TaskRun",{"type":53,"value":893}," model.",{"type":47,"tag":63,"props":895,"children":898},{"className":896,"code":897,"language":267,"meta":68,"style":68},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# In Django shell (python manage.py shell)\nfrom products.tasks.backend.models import TaskRun\nfrom posthog.storage import object_storage\n\n# Find the most recent task run\nrun = TaskRun.objects.order_by(\"-created_at\").first()\nprint(f\"status: {run.status}, error: {run.error_message}\")\nprint(f\"log_url: {run.log_url}\")\n\n# Read the log\ncontent = object_storage.read(run.log_url, missing_ok=True)\n\n# Print last 3000 chars (most useful — shows what happened before failure)\nprint(content[-3000:])\n",[899],{"type":47,"tag":71,"props":900,"children":901},{"__ignoreMap":68},[902,910,918,926,933,941,949,957,965,972,980,988,995,1003],{"type":47,"tag":91,"props":903,"children":904},{"class":93,"line":94},[905],{"type":47,"tag":91,"props":906,"children":907},{},[908],{"type":53,"value":909},"# In Django shell (python manage.py shell)\n",{"type":47,"tag":91,"props":911,"children":912},{"class":93,"line":104},[913],{"type":47,"tag":91,"props":914,"children":915},{},[916],{"type":53,"value":917},"from products.tasks.backend.models import TaskRun\n",{"type":47,"tag":91,"props":919,"children":920},{"class":93,"line":183},[921],{"type":47,"tag":91,"props":922,"children":923},{},[924],{"type":53,"value":925},"from posthog.storage import object_storage\n",{"type":47,"tag":91,"props":927,"children":928},{"class":93,"line":193},[929],{"type":47,"tag":91,"props":930,"children":931},{"emptyLinePlaceholder":187},[932],{"type":53,"value":190},{"type":47,"tag":91,"props":934,"children":935},{"class":93,"line":202},[936],{"type":47,"tag":91,"props":937,"children":938},{},[939],{"type":53,"value":940},"# Find the most recent task run\n",{"type":47,"tag":91,"props":942,"children":943},{"class":93,"line":244},[944],{"type":47,"tag":91,"props":945,"children":946},{},[947],{"type":53,"value":948},"run = TaskRun.objects.order_by(\"-created_at\").first()\n",{"type":47,"tag":91,"props":950,"children":951},{"class":93,"line":252},[952],{"type":47,"tag":91,"props":953,"children":954},{},[955],{"type":53,"value":956},"print(f\"status: {run.status}, error: {run.error_message}\")\n",{"type":47,"tag":91,"props":958,"children":959},{"class":93,"line":261},[960],{"type":47,"tag":91,"props":961,"children":962},{},[963],{"type":53,"value":964},"print(f\"log_url: {run.log_url}\")\n",{"type":47,"tag":91,"props":966,"children":967},{"class":93,"line":668},[968],{"type":47,"tag":91,"props":969,"children":970},{"emptyLinePlaceholder":187},[971],{"type":53,"value":190},{"type":47,"tag":91,"props":973,"children":974},{"class":93,"line":677},[975],{"type":47,"tag":91,"props":976,"children":977},{},[978],{"type":53,"value":979},"# Read the log\n",{"type":47,"tag":91,"props":981,"children":982},{"class":93,"line":30},[983],{"type":47,"tag":91,"props":984,"children":985},{},[986],{"type":53,"value":987},"content = object_storage.read(run.log_url, missing_ok=True)\n",{"type":47,"tag":91,"props":989,"children":990},{"class":93,"line":694},[991],{"type":47,"tag":91,"props":992,"children":993},{"emptyLinePlaceholder":187},[994],{"type":53,"value":190},{"type":47,"tag":91,"props":996,"children":997},{"class":93,"line":721},[998],{"type":47,"tag":91,"props":999,"children":1000},{},[1001],{"type":53,"value":1002},"# Print last 3000 chars (most useful — shows what happened before failure)\n",{"type":47,"tag":91,"props":1004,"children":1005},{"class":93,"line":747},[1006],{"type":47,"tag":91,"props":1007,"children":1008},{},[1009],{"type":53,"value":1010},"print(content[-3000:])\n",{"type":47,"tag":310,"props":1012,"children":1013},{},[1014],{"type":53,"value":1015},"The log is JSONL with entries like:",{"type":47,"tag":63,"props":1017,"children":1021},{"className":1018,"code":1019,"language":1020,"meta":68,"style":68},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"type\": \"notification\",\n  \"timestamp\": \"...\",\n  \"notification\": { \"jsonrpc\": \"2.0\", \"method\": \"_posthog\u002Fconsole\", \"params\": { \"level\": \"debug\", \"message\": \"...\" } }\n}\n","json",[1022],{"type":47,"tag":71,"props":1023,"children":1024},{"__ignoreMap":68},[1025,1033,1073,1110,1296],{"type":47,"tag":91,"props":1026,"children":1027},{"class":93,"line":94},[1028],{"type":47,"tag":91,"props":1029,"children":1030},{"style":114},[1031],{"type":53,"value":1032},"{\n",{"type":47,"tag":91,"props":1034,"children":1035},{"class":93,"line":104},[1036,1041,1046,1050,1055,1059,1064,1068],{"type":47,"tag":91,"props":1037,"children":1038},{"style":114},[1039],{"type":53,"value":1040},"  \"",{"type":47,"tag":91,"props":1042,"children":1044},{"style":1043},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[1045],{"type":53,"value":471},{"type":47,"tag":91,"props":1047,"children":1048},{"style":114},[1049],{"type":53,"value":554},{"type":47,"tag":91,"props":1051,"children":1052},{"style":114},[1053],{"type":53,"value":1054},":",{"type":47,"tag":91,"props":1056,"children":1057},{"style":114},[1058],{"type":53,"value":584},{"type":47,"tag":91,"props":1060,"children":1061},{"style":120},[1062],{"type":53,"value":1063},"notification",{"type":47,"tag":91,"props":1065,"children":1066},{"style":114},[1067],{"type":53,"value":554},{"type":47,"tag":91,"props":1069,"children":1070},{"style":114},[1071],{"type":53,"value":1072},",\n",{"type":47,"tag":91,"props":1074,"children":1075},{"class":93,"line":183},[1076,1080,1085,1089,1093,1097,1102,1106],{"type":47,"tag":91,"props":1077,"children":1078},{"style":114},[1079],{"type":53,"value":1040},{"type":47,"tag":91,"props":1081,"children":1082},{"style":1043},[1083],{"type":53,"value":1084},"timestamp",{"type":47,"tag":91,"props":1086,"children":1087},{"style":114},[1088],{"type":53,"value":554},{"type":47,"tag":91,"props":1090,"children":1091},{"style":114},[1092],{"type":53,"value":1054},{"type":47,"tag":91,"props":1094,"children":1095},{"style":114},[1096],{"type":53,"value":584},{"type":47,"tag":91,"props":1098,"children":1099},{"style":120},[1100],{"type":53,"value":1101},"...",{"type":47,"tag":91,"props":1103,"children":1104},{"style":114},[1105],{"type":53,"value":554},{"type":47,"tag":91,"props":1107,"children":1108},{"style":114},[1109],{"type":53,"value":1072},{"type":47,"tag":91,"props":1111,"children":1112},{"class":93,"line":193},[1113,1117,1121,1125,1129,1134,1138,1143,1147,1151,1155,1160,1164,1169,1173,1178,1182,1186,1190,1195,1199,1203,1207,1212,1216,1220,1224,1228,1233,1237,1241,1245,1250,1254,1258,1262,1266,1270,1274,1278,1282,1286,1291],{"type":47,"tag":91,"props":1114,"children":1115},{"style":114},[1116],{"type":53,"value":1040},{"type":47,"tag":91,"props":1118,"children":1119},{"style":1043},[1120],{"type":53,"value":1063},{"type":47,"tag":91,"props":1122,"children":1123},{"style":114},[1124],{"type":53,"value":554},{"type":47,"tag":91,"props":1126,"children":1127},{"style":114},[1128],{"type":53,"value":1054},{"type":47,"tag":91,"props":1130,"children":1131},{"style":114},[1132],{"type":53,"value":1133}," {",{"type":47,"tag":91,"props":1135,"children":1136},{"style":114},[1137],{"type":53,"value":584},{"type":47,"tag":91,"props":1139,"children":1140},{"style":126},[1141],{"type":53,"value":1142},"jsonrpc",{"type":47,"tag":91,"props":1144,"children":1145},{"style":114},[1146],{"type":53,"value":554},{"type":47,"tag":91,"props":1148,"children":1149},{"style":114},[1150],{"type":53,"value":1054},{"type":47,"tag":91,"props":1152,"children":1153},{"style":114},[1154],{"type":53,"value":584},{"type":47,"tag":91,"props":1156,"children":1157},{"style":120},[1158],{"type":53,"value":1159},"2.0",{"type":47,"tag":91,"props":1161,"children":1162},{"style":114},[1163],{"type":53,"value":554},{"type":47,"tag":91,"props":1165,"children":1166},{"style":114},[1167],{"type":53,"value":1168},",",{"type":47,"tag":91,"props":1170,"children":1171},{"style":114},[1172],{"type":53,"value":584},{"type":47,"tag":91,"props":1174,"children":1175},{"style":126},[1176],{"type":53,"value":1177},"method",{"type":47,"tag":91,"props":1179,"children":1180},{"style":114},[1181],{"type":53,"value":554},{"type":47,"tag":91,"props":1183,"children":1184},{"style":114},[1185],{"type":53,"value":1054},{"type":47,"tag":91,"props":1187,"children":1188},{"style":114},[1189],{"type":53,"value":584},{"type":47,"tag":91,"props":1191,"children":1192},{"style":120},[1193],{"type":53,"value":1194},"_posthog\u002Fconsole",{"type":47,"tag":91,"props":1196,"children":1197},{"style":114},[1198],{"type":53,"value":554},{"type":47,"tag":91,"props":1200,"children":1201},{"style":114},[1202],{"type":53,"value":1168},{"type":47,"tag":91,"props":1204,"children":1205},{"style":114},[1206],{"type":53,"value":584},{"type":47,"tag":91,"props":1208,"children":1209},{"style":126},[1210],{"type":53,"value":1211},"params",{"type":47,"tag":91,"props":1213,"children":1214},{"style":114},[1215],{"type":53,"value":554},{"type":47,"tag":91,"props":1217,"children":1218},{"style":114},[1219],{"type":53,"value":1054},{"type":47,"tag":91,"props":1221,"children":1222},{"style":114},[1223],{"type":53,"value":1133},{"type":47,"tag":91,"props":1225,"children":1226},{"style":114},[1227],{"type":53,"value":584},{"type":47,"tag":91,"props":1229,"children":1230},{"style":157},[1231],{"type":53,"value":1232},"level",{"type":47,"tag":91,"props":1234,"children":1235},{"style":114},[1236],{"type":53,"value":554},{"type":47,"tag":91,"props":1238,"children":1239},{"style":114},[1240],{"type":53,"value":1054},{"type":47,"tag":91,"props":1242,"children":1243},{"style":114},[1244],{"type":53,"value":584},{"type":47,"tag":91,"props":1246,"children":1247},{"style":120},[1248],{"type":53,"value":1249},"debug",{"type":47,"tag":91,"props":1251,"children":1252},{"style":114},[1253],{"type":53,"value":554},{"type":47,"tag":91,"props":1255,"children":1256},{"style":114},[1257],{"type":53,"value":1168},{"type":47,"tag":91,"props":1259,"children":1260},{"style":114},[1261],{"type":53,"value":584},{"type":47,"tag":91,"props":1263,"children":1264},{"style":157},[1265],{"type":53,"value":780},{"type":47,"tag":91,"props":1267,"children":1268},{"style":114},[1269],{"type":53,"value":554},{"type":47,"tag":91,"props":1271,"children":1272},{"style":114},[1273],{"type":53,"value":1054},{"type":47,"tag":91,"props":1275,"children":1276},{"style":114},[1277],{"type":53,"value":584},{"type":47,"tag":91,"props":1279,"children":1280},{"style":120},[1281],{"type":53,"value":1101},{"type":47,"tag":91,"props":1283,"children":1284},{"style":114},[1285],{"type":53,"value":554},{"type":47,"tag":91,"props":1287,"children":1288},{"style":114},[1289],{"type":53,"value":1290}," }",{"type":47,"tag":91,"props":1292,"children":1293},{"style":114},[1294],{"type":53,"value":1295}," }\n",{"type":47,"tag":91,"props":1297,"children":1298},{"class":93,"line":202},[1299],{"type":47,"tag":91,"props":1300,"children":1301},{"style":114},[1302],{"type":53,"value":1303},"}\n",{"type":47,"tag":310,"props":1305,"children":1306},{},[1307],{"type":53,"value":1308},"Key things to look for in the log tail:",{"type":47,"tag":1310,"props":1311,"children":1312},"ul",{},[1313,1333,1347],{"type":47,"tag":1314,"props":1315,"children":1316},"li",{},[1317,1323,1325,1331],{"type":47,"tag":1318,"props":1319,"children":1320},"strong",{},[1321],{"type":53,"value":1322},"agentsh network events",{"type":53,"value":1324}," — ",{"type":47,"tag":71,"props":1326,"children":1328},{"className":1327},[],[1329],{"type":53,"value":1330},"DENY",{"type":53,"value":1332}," entries show blocked network calls",{"type":47,"tag":1314,"props":1334,"children":1335},{},[1336,1345],{"type":47,"tag":1318,"props":1337,"children":1338},{},[1339],{"type":47,"tag":71,"props":1340,"children":1342},{"className":1341},[],[1343],{"type":53,"value":1344},"_posthog\u002Fprogress",{"type":53,"value":1346}," events — show which setup step the sandbox reached",{"type":47,"tag":1314,"props":1348,"children":1349},{},[1350,1358],{"type":47,"tag":1318,"props":1351,"children":1352},{},[1353],{"type":47,"tag":71,"props":1354,"children":1356},{"className":1355},[],[1357],{"type":53,"value":1194},{"type":53,"value":1359}," debug messages — show sandbox provisioning, cloning, agent startup",{"type":47,"tag":56,"props":1361,"children":1363},{"id":1362},"inspecting-docker-sandbox-containers",[1364],{"type":53,"value":1365},"Inspecting Docker sandbox containers",{"type":47,"tag":63,"props":1367,"children":1369},{"className":83,"code":1368,"language":85,"meta":68,"style":68},"# List running sandbox containers\ndocker ps --filter \"name=task-sandbox\" --format \"table {{.Names}}\\t{{.Status}}\\t{{.Image}}\"\n\n# See processes inside a running sandbox\ndocker exec \u003Ccontainer-name> ps aux\n\n# Read the agent-server log inside the container (while it's still running)\ndocker exec \u003Ccontainer-name> cat \u002Ftmp\u002Fagent-server.log\n",[1370],{"type":47,"tag":71,"props":1371,"children":1372},{"__ignoreMap":68},[1373,1381,1430,1437,1445,1486,1493,1501],{"type":47,"tag":91,"props":1374,"children":1375},{"class":93,"line":94},[1376],{"type":47,"tag":91,"props":1377,"children":1378},{"style":98},[1379],{"type":53,"value":1380},"# List running sandbox containers\n",{"type":47,"tag":91,"props":1382,"children":1383},{"class":93,"line":104},[1384,1389,1394,1399,1403,1408,1412,1417,1421,1426],{"type":47,"tag":91,"props":1385,"children":1386},{"style":126},[1387],{"type":53,"value":1388},"docker",{"type":47,"tag":91,"props":1390,"children":1391},{"style":120},[1392],{"type":53,"value":1393}," ps",{"type":47,"tag":91,"props":1395,"children":1396},{"style":120},[1397],{"type":53,"value":1398}," --filter",{"type":47,"tag":91,"props":1400,"children":1401},{"style":114},[1402],{"type":53,"value":584},{"type":47,"tag":91,"props":1404,"children":1405},{"style":120},[1406],{"type":53,"value":1407},"name=task-sandbox",{"type":47,"tag":91,"props":1409,"children":1410},{"style":114},[1411],{"type":53,"value":554},{"type":47,"tag":91,"props":1413,"children":1414},{"style":120},[1415],{"type":53,"value":1416}," --format",{"type":47,"tag":91,"props":1418,"children":1419},{"style":114},[1420],{"type":53,"value":584},{"type":47,"tag":91,"props":1422,"children":1423},{"style":120},[1424],{"type":53,"value":1425},"table {{.Names}}\\t{{.Status}}\\t{{.Image}}",{"type":47,"tag":91,"props":1427,"children":1428},{"style":114},[1429],{"type":53,"value":524},{"type":47,"tag":91,"props":1431,"children":1432},{"class":93,"line":183},[1433],{"type":47,"tag":91,"props":1434,"children":1435},{"emptyLinePlaceholder":187},[1436],{"type":53,"value":190},{"type":47,"tag":91,"props":1438,"children":1439},{"class":93,"line":193},[1440],{"type":47,"tag":91,"props":1441,"children":1442},{"style":98},[1443],{"type":53,"value":1444},"# See processes inside a running sandbox\n",{"type":47,"tag":91,"props":1446,"children":1447},{"class":93,"line":202},[1448,1452,1457,1462,1467,1472,1477,1481],{"type":47,"tag":91,"props":1449,"children":1450},{"style":126},[1451],{"type":53,"value":1388},{"type":47,"tag":91,"props":1453,"children":1454},{"style":120},[1455],{"type":53,"value":1456}," exec",{"type":47,"tag":91,"props":1458,"children":1459},{"style":114},[1460],{"type":53,"value":1461}," \u003C",{"type":47,"tag":91,"props":1463,"children":1464},{"style":120},[1465],{"type":53,"value":1466},"container-nam",{"type":47,"tag":91,"props":1468,"children":1469},{"style":108},[1470],{"type":53,"value":1471},"e",{"type":47,"tag":91,"props":1473,"children":1474},{"style":114},[1475],{"type":53,"value":1476},">",{"type":47,"tag":91,"props":1478,"children":1479},{"style":120},[1480],{"type":53,"value":1393},{"type":47,"tag":91,"props":1482,"children":1483},{"style":120},[1484],{"type":53,"value":1485}," aux\n",{"type":47,"tag":91,"props":1487,"children":1488},{"class":93,"line":244},[1489],{"type":47,"tag":91,"props":1490,"children":1491},{"emptyLinePlaceholder":187},[1492],{"type":53,"value":190},{"type":47,"tag":91,"props":1494,"children":1495},{"class":93,"line":252},[1496],{"type":47,"tag":91,"props":1497,"children":1498},{"style":98},[1499],{"type":53,"value":1500},"# Read the agent-server log inside the container (while it's still running)\n",{"type":47,"tag":91,"props":1502,"children":1503},{"class":93,"line":261},[1504,1508,1512,1516,1520,1524,1528,1533],{"type":47,"tag":91,"props":1505,"children":1506},{"style":126},[1507],{"type":53,"value":1388},{"type":47,"tag":91,"props":1509,"children":1510},{"style":120},[1511],{"type":53,"value":1456},{"type":47,"tag":91,"props":1513,"children":1514},{"style":114},[1515],{"type":53,"value":1461},{"type":47,"tag":91,"props":1517,"children":1518},{"style":120},[1519],{"type":53,"value":1466},{"type":47,"tag":91,"props":1521,"children":1522},{"style":108},[1523],{"type":53,"value":1471},{"type":47,"tag":91,"props":1525,"children":1526},{"style":114},[1527],{"type":53,"value":1476},{"type":47,"tag":91,"props":1529,"children":1530},{"style":120},[1531],{"type":53,"value":1532}," cat",{"type":47,"tag":91,"props":1534,"children":1535},{"style":120},[1536],{"type":53,"value":1537}," \u002Ftmp\u002Fagent-server.log\n",{"type":47,"tag":310,"props":1539,"children":1540},{},[1541,1543,1549,1551,1557],{"type":53,"value":1542},"The container is named ",{"type":47,"tag":71,"props":1544,"children":1546},{"className":1545},[],[1547],{"type":53,"value":1548},"task-sandbox-\u003Ctask-id>-\u003Crandom>",{"type":53,"value":1550}," and uses the ",{"type":47,"tag":71,"props":1552,"children":1554},{"className":1553},[],[1555],{"type":53,"value":1556},"posthog-sandbox-base",{"type":53,"value":1558}," image.\nContainers are ephemeral — they're removed after the task run completes, so inspect while running.",{"type":47,"tag":56,"props":1560,"children":1562},{"id":1561},"common-failures",[1563],{"type":53,"value":1564},"Common failures",{"type":47,"tag":335,"props":1566,"children":1568},{"id":1567},"signalreport-matching-query-does-not-exist",[1569],{"type":47,"tag":71,"props":1570,"children":1572},{"className":1571},[],[1573],{"type":53,"value":1574},"SignalReport matching query does not exist",{"type":47,"tag":310,"props":1576,"children":1577},{},[1578,1580,1586,1588,1594],{"type":53,"value":1579},"The ",{"type":47,"tag":71,"props":1581,"children":1583},{"className":1582},[],[1584],{"type":53,"value":1585},"assign_and_emit_signal_activity",{"type":53,"value":1587}," tried to assign a signal to a report that doesn't exist.\nUsually caused by stale embeddings in ClickHouse after a ",{"type":47,"tag":71,"props":1589,"children":1591},{"className":1590},[],[1592],{"type":53,"value":1593},"cleanup_signals",{"type":53,"value":1595}," that failed to delete them.",{"type":47,"tag":310,"props":1597,"children":1598},{},[1599,1604,1606,1612,1614,1620,1622,1628,1630,1635,1637,1643,1645,1650],{"type":47,"tag":1318,"props":1600,"children":1601},{},[1602],{"type":53,"value":1603},"Root cause:",{"type":53,"value":1605}," ",{"type":47,"tag":71,"props":1607,"children":1609},{"className":1608},[],[1610],{"type":53,"value":1611},"CLICKHOUSE_DATABASE",{"type":53,"value":1613}," not set in ",{"type":47,"tag":71,"props":1615,"children":1617},{"className":1616},[],[1618],{"type":53,"value":1619},".env",{"type":53,"value":1621},". The cleanup command uses ",{"type":47,"tag":71,"props":1623,"children":1625},{"className":1624},[],[1626],{"type":53,"value":1627},"sync_execute",{"type":53,"value":1629},"\nwhich connects to the ",{"type":47,"tag":71,"props":1631,"children":1633},{"className":1632},[],[1634],{"type":53,"value":1611},{"type":53,"value":1636}," (defaults to ",{"type":47,"tag":71,"props":1638,"children":1640},{"className":1639},[],[1641],{"type":53,"value":1642},"default",{"type":53,"value":1644},"), but the embedding tables\nlive in the ",{"type":47,"tag":71,"props":1646,"children":1648},{"className":1647},[],[1649],{"type":53,"value":8},{"type":53,"value":1651}," database.",{"type":47,"tag":310,"props":1653,"children":1654},{},[1655,1660,1662,1668,1670,1675],{"type":47,"tag":1318,"props":1656,"children":1657},{},[1658],{"type":53,"value":1659},"Fix:",{"type":53,"value":1661}," Add ",{"type":47,"tag":71,"props":1663,"children":1665},{"className":1664},[],[1666],{"type":53,"value":1667},"CLICKHOUSE_DATABASE=posthog",{"type":53,"value":1669}," to ",{"type":47,"tag":71,"props":1671,"children":1673},{"className":1672},[],[1674],{"type":53,"value":1619},{"type":53,"value":1676}," and restart workers.",{"type":47,"tag":310,"props":1678,"children":1679},{},[1680],{"type":47,"tag":1318,"props":1681,"children":1682},{},[1683],{"type":53,"value":1684},"Manual cleanup of stale embeddings:",{"type":47,"tag":63,"props":1686,"children":1688},{"className":83,"code":1687,"language":85,"meta":68,"style":68},"curl -s 'http:\u002F\u002Flocalhost:8123\u002F' --data-binary \\\n  \"ALTER TABLE posthog.sharded_posthog_document_embeddings_text_embedding_3_small_1536 DELETE WHERE product = 'signals' AND team_id = 1 SETTINGS mutations_sync = 1\"\n",[1689],{"type":47,"tag":71,"props":1690,"children":1691},{"__ignoreMap":68},[1692,1725],{"type":47,"tag":91,"props":1693,"children":1694},{"class":93,"line":94},[1695,1699,1703,1707,1712,1716,1721],{"type":47,"tag":91,"props":1696,"children":1697},{"style":126},[1698],{"type":53,"value":355},{"type":47,"tag":91,"props":1700,"children":1701},{"style":120},[1702],{"type":53,"value":360},{"type":47,"tag":91,"props":1704,"children":1705},{"style":114},[1706],{"type":53,"value":365},{"type":47,"tag":91,"props":1708,"children":1709},{"style":120},[1710],{"type":53,"value":1711},"http:\u002F\u002Flocalhost:8123\u002F",{"type":47,"tag":91,"props":1713,"children":1714},{"style":114},[1715],{"type":53,"value":375},{"type":47,"tag":91,"props":1717,"children":1718},{"style":120},[1719],{"type":53,"value":1720}," --data-binary",{"type":47,"tag":91,"props":1722,"children":1723},{"style":108},[1724],{"type":53,"value":380},{"type":47,"tag":91,"props":1726,"children":1727},{"class":93,"line":104},[1728,1732,1737],{"type":47,"tag":91,"props":1729,"children":1730},{"style":114},[1731],{"type":53,"value":1040},{"type":47,"tag":91,"props":1733,"children":1734},{"style":120},[1735],{"type":53,"value":1736},"ALTER TABLE posthog.sharded_posthog_document_embeddings_text_embedding_3_small_1536 DELETE WHERE product = 'signals' AND team_id = 1 SETTINGS mutations_sync = 1",{"type":47,"tag":91,"props":1738,"children":1739},{"style":114},[1740],{"type":53,"value":524},{"type":47,"tag":310,"props":1742,"children":1743},{},[1744],{"type":47,"tag":1318,"props":1745,"children":1746},{},[1747],{"type":53,"value":1748},"Verify embeddings are clean:",{"type":47,"tag":63,"props":1750,"children":1752},{"className":83,"code":1751,"language":85,"meta":68,"style":68},"curl -s 'http:\u002F\u002Flocalhost:8123\u002F' --data-binary \\\n  \"SELECT count() FROM posthog.sharded_posthog_document_embeddings_text_embedding_3_small_1536 WHERE team_id = 1 AND product = 'signals'\"\n",[1753],{"type":47,"tag":71,"props":1754,"children":1755},{"__ignoreMap":68},[1756,1787],{"type":47,"tag":91,"props":1757,"children":1758},{"class":93,"line":94},[1759,1763,1767,1771,1775,1779,1783],{"type":47,"tag":91,"props":1760,"children":1761},{"style":126},[1762],{"type":53,"value":355},{"type":47,"tag":91,"props":1764,"children":1765},{"style":120},[1766],{"type":53,"value":360},{"type":47,"tag":91,"props":1768,"children":1769},{"style":114},[1770],{"type":53,"value":365},{"type":47,"tag":91,"props":1772,"children":1773},{"style":120},[1774],{"type":53,"value":1711},{"type":47,"tag":91,"props":1776,"children":1777},{"style":114},[1778],{"type":53,"value":375},{"type":47,"tag":91,"props":1780,"children":1781},{"style":120},[1782],{"type":53,"value":1720},{"type":47,"tag":91,"props":1784,"children":1785},{"style":108},[1786],{"type":53,"value":380},{"type":47,"tag":91,"props":1788,"children":1789},{"class":93,"line":104},[1790,1794,1799],{"type":47,"tag":91,"props":1791,"children":1792},{"style":114},[1793],{"type":53,"value":1040},{"type":47,"tag":91,"props":1795,"children":1796},{"style":120},[1797],{"type":53,"value":1798},"SELECT count() FROM posthog.sharded_posthog_document_embeddings_text_embedding_3_small_1536 WHERE team_id = 1 AND product = 'signals'",{"type":47,"tag":91,"props":1800,"children":1801},{"style":114},[1802],{"type":53,"value":524},{"type":47,"tag":335,"props":1804,"children":1806},{"id":1805},"run-timed-out-due-to-inactivity-on-select_repository_activity",[1807,1813,1815],{"type":47,"tag":71,"props":1808,"children":1810},{"className":1809},[],[1811],{"type":53,"value":1812},"Run timed out due to inactivity",{"type":53,"value":1814}," on ",{"type":47,"tag":71,"props":1816,"children":1818},{"className":1817},[],[1819],{"type":53,"value":1820},"select_repository_activity",{"type":47,"tag":310,"props":1822,"children":1823},{},[1824,1826,1832,1834,1840],{"type":53,"value":1825},"The sandbox Claude agent went idle for longer than ",{"type":47,"tag":71,"props":1827,"children":1829},{"className":1828},[],[1830],{"type":53,"value":1831},"TASKS_INACTIVITY_TIMEOUT_SECONDS",{"type":53,"value":1833},". When unset\nthis falls back to a 2 hour timeout — set ",{"type":47,"tag":71,"props":1835,"children":1837},{"className":1836},[],[1838],{"type":53,"value":1839},"TASKS_INACTIVITY_TIMEOUT_SECONDS=30",{"type":53,"value":1841}," locally to force fast failures.",{"type":47,"tag":310,"props":1843,"children":1844},{},[1845,1850],{"type":47,"tag":1318,"props":1846,"children":1847},{},[1848],{"type":53,"value":1849},"Diagnosing:",{"type":53,"value":1851}," Read the agent log from object storage (see above). Check the tail for:",{"type":47,"tag":1853,"props":1854,"children":1855},"ol",{},[1856,1889,1899],{"type":47,"tag":1314,"props":1857,"children":1858},{},[1859,1864,1865,1871,1873,1879,1881,1887],{"type":47,"tag":1318,"props":1860,"children":1861},{},[1862],{"type":53,"value":1863},"agentsh network denials",{"type":53,"value":1324},{"type":47,"tag":71,"props":1866,"children":1868},{"className":1867},[],[1869],{"type":53,"value":1870},"DENY host.docker.internal",{"type":53,"value":1872}," means the MCP server URL is blocked\nby the sandbox network policy. The ",{"type":47,"tag":71,"props":1874,"children":1876},{"className":1875},[],[1877],{"type":53,"value":1878},"SIGNALS_REPO_DISCOVERY",{"type":53,"value":1880}," environment's domain allowlist\ndoesn't include ",{"type":47,"tag":71,"props":1882,"children":1884},{"className":1883},[],[1885],{"type":53,"value":1886},"host.docker.internal",{"type":53,"value":1888},".",{"type":47,"tag":1314,"props":1890,"children":1891},{},[1892,1897],{"type":47,"tag":1318,"props":1893,"children":1894},{},[1895],{"type":53,"value":1896},"No log content at all",{"type":53,"value":1898}," — sandbox failed to start, check Docker container logs.",{"type":47,"tag":1314,"props":1900,"children":1901},{},[1902,1907,1909,1915],{"type":47,"tag":1318,"props":1903,"children":1904},{},[1905],{"type":53,"value":1906},"Claude API errors",{"type":53,"value":1908}," — check if ",{"type":47,"tag":71,"props":1910,"children":1912},{"className":1911},[],[1913],{"type":53,"value":1914},"ANTHROPIC_API_KEY",{"type":53,"value":1916}," is valid.",{"type":47,"tag":335,"props":1918,"children":1920},{"id":1919},"buffer-signals-sits-idle-never-receives-signals",[1921,1927],{"type":47,"tag":71,"props":1922,"children":1924},{"className":1923},[],[1925],{"type":53,"value":1926},"buffer-signals",{"type":53,"value":1928}," sits idle, never receives signals",{"type":47,"tag":310,"props":1930,"children":1931},{},[1932,1933,1939,1941,1946,1948,1954],{"type":53,"value":1579},{"type":47,"tag":71,"props":1934,"children":1936},{"className":1935},[],[1937],{"type":53,"value":1938},"signal-emitter",{"type":53,"value":1940}," completed but ",{"type":47,"tag":71,"props":1942,"children":1944},{"className":1943},[],[1945],{"type":53,"value":1926},{"type":53,"value":1947}," never got the ",{"type":47,"tag":71,"props":1949,"children":1951},{"className":1950},[],[1952],{"type":53,"value":1953},"submit_signal",{"type":53,"value":1955},".\nThis happens when the emitter sent the signal to a previous buffer run that then continued-as-new,\nand the new run started fresh without the pending signal. Re-emit the signal.",{"type":47,"tag":335,"props":1957,"children":1959},{"id":1958},"clickhouse-embedding-tables-not-found-during-cleanup",[1960],{"type":53,"value":1961},"ClickHouse embedding tables \"not found\" during cleanup",{"type":47,"tag":310,"props":1963,"children":1964},{},[1965,1967,1972,1974,1979,1981,1986],{"type":53,"value":1966},"The tables exist in the ",{"type":47,"tag":71,"props":1968,"children":1970},{"className":1969},[],[1971],{"type":53,"value":8},{"type":53,"value":1973}," database but ",{"type":47,"tag":71,"props":1975,"children":1977},{"className":1976},[],[1978],{"type":53,"value":1627},{"type":53,"value":1980}," queries the ",{"type":47,"tag":71,"props":1982,"children":1984},{"className":1983},[],[1985],{"type":53,"value":1642},{"type":53,"value":1651},{"type":47,"tag":63,"props":1988,"children":1990},{"className":83,"code":1989,"language":85,"meta":68,"style":68},"# Verify tables exist\ncurl -s 'http:\u002F\u002Flocalhost:8123\u002F' --data-binary \"SHOW TABLES FROM posthog LIKE '%embed%'\"\n\n# Check current CLICKHOUSE_DATABASE setting\ngrep CLICKHOUSE_DATABASE .env\n",[1991],{"type":47,"tag":71,"props":1992,"children":1993},{"__ignoreMap":68},[1994,2002,2042,2049,2057],{"type":47,"tag":91,"props":1995,"children":1996},{"class":93,"line":94},[1997],{"type":47,"tag":91,"props":1998,"children":1999},{"style":98},[2000],{"type":53,"value":2001},"# Verify tables exist\n",{"type":47,"tag":91,"props":2003,"children":2004},{"class":93,"line":104},[2005,2009,2013,2017,2021,2025,2029,2033,2038],{"type":47,"tag":91,"props":2006,"children":2007},{"style":126},[2008],{"type":53,"value":355},{"type":47,"tag":91,"props":2010,"children":2011},{"style":120},[2012],{"type":53,"value":360},{"type":47,"tag":91,"props":2014,"children":2015},{"style":114},[2016],{"type":53,"value":365},{"type":47,"tag":91,"props":2018,"children":2019},{"style":120},[2020],{"type":53,"value":1711},{"type":47,"tag":91,"props":2022,"children":2023},{"style":114},[2024],{"type":53,"value":375},{"type":47,"tag":91,"props":2026,"children":2027},{"style":120},[2028],{"type":53,"value":1720},{"type":47,"tag":91,"props":2030,"children":2031},{"style":114},[2032],{"type":53,"value":584},{"type":47,"tag":91,"props":2034,"children":2035},{"style":120},[2036],{"type":53,"value":2037},"SHOW TABLES FROM posthog LIKE '%embed%'",{"type":47,"tag":91,"props":2039,"children":2040},{"style":114},[2041],{"type":53,"value":524},{"type":47,"tag":91,"props":2043,"children":2044},{"class":93,"line":183},[2045],{"type":47,"tag":91,"props":2046,"children":2047},{"emptyLinePlaceholder":187},[2048],{"type":53,"value":190},{"type":47,"tag":91,"props":2050,"children":2051},{"class":93,"line":193},[2052],{"type":47,"tag":91,"props":2053,"children":2054},{"style":98},[2055],{"type":53,"value":2056},"# Check current CLICKHOUSE_DATABASE setting\n",{"type":47,"tag":91,"props":2058,"children":2059},{"class":93,"line":202},[2060,2065,2070],{"type":47,"tag":91,"props":2061,"children":2062},{"style":126},[2063],{"type":53,"value":2064},"grep",{"type":47,"tag":91,"props":2066,"children":2067},{"style":120},[2068],{"type":53,"value":2069}," CLICKHOUSE_DATABASE",{"type":47,"tag":91,"props":2071,"children":2072},{"style":120},[2073],{"type":53,"value":2074}," .env\n",{"type":47,"tag":56,"props":2076,"children":2078},{"id":2077},"useful-management-commands",[2079],{"type":53,"value":2080},"Useful management commands",{"type":47,"tag":2082,"props":2083,"children":2084},"table",{},[2085,2104],{"type":47,"tag":2086,"props":2087,"children":2088},"thead",{},[2089],{"type":47,"tag":2090,"props":2091,"children":2092},"tr",{},[2093,2099],{"type":47,"tag":2094,"props":2095,"children":2096},"th",{},[2097],{"type":53,"value":2098},"Command",{"type":47,"tag":2094,"props":2100,"children":2101},{},[2102],{"type":53,"value":2103},"Purpose",{"type":47,"tag":2105,"props":2106,"children":2107},"tbody",{},[2108,2126,2143,2160,2177,2194],{"type":47,"tag":2090,"props":2109,"children":2110},{},[2111,2121],{"type":47,"tag":2112,"props":2113,"children":2114},"td",{},[2115],{"type":47,"tag":71,"props":2116,"children":2118},{"className":2117},[],[2119],{"type":53,"value":2120},"emit_signals_from_fixture",{"type":47,"tag":2112,"props":2122,"children":2123},{},[2124],{"type":53,"value":2125},"Emit test signals from JSON fixtures",{"type":47,"tag":2090,"props":2127,"children":2128},{},[2129,2138],{"type":47,"tag":2112,"props":2130,"children":2131},{},[2132],{"type":47,"tag":71,"props":2133,"children":2135},{"className":2134},[],[2136],{"type":53,"value":2137},"DEBUG=1 cleanup_signals --team-id N --yes",{"type":47,"tag":2112,"props":2139,"children":2140},{},[2141],{"type":53,"value":2142},"Delete all signal data and terminate workflows",{"type":47,"tag":2090,"props":2144,"children":2145},{},[2146,2155],{"type":47,"tag":2112,"props":2147,"children":2148},{},[2149],{"type":47,"tag":71,"props":2150,"children":2152},{"className":2151},[],[2153],{"type":53,"value":2154},"signal_pipeline_status --team-id N --wait",{"type":47,"tag":2112,"props":2156,"children":2157},{},[2158],{"type":53,"value":2159},"Wait for pipeline to finish processing",{"type":47,"tag":2090,"props":2161,"children":2162},{},[2163,2172],{"type":47,"tag":2112,"props":2164,"children":2165},{},[2166],{"type":47,"tag":71,"props":2167,"children":2169},{"className":2168},[],[2170],{"type":53,"value":2171},"list_signal_reports --team-id N --signals --json",{"type":47,"tag":2112,"props":2173,"children":2174},{},[2175],{"type":53,"value":2176},"Inspect grouping results",{"type":47,"tag":2090,"props":2178,"children":2179},{},[2180,2189],{"type":47,"tag":2112,"props":2181,"children":2182},{},[2183],{"type":47,"tag":71,"props":2184,"children":2186},{"className":2185},[],[2187],{"type":53,"value":2188},"ingest_signals_json \u003Cfile> --team-id N",{"type":47,"tag":2112,"props":2190,"children":2191},{},[2192],{"type":53,"value":2193},"Ingest pre-processed signals from JSON",{"type":47,"tag":2090,"props":2195,"children":2196},{},[2197,2206],{"type":47,"tag":2112,"props":2198,"children":2199},{},[2200],{"type":47,"tag":71,"props":2201,"children":2203},{"className":2202},[],[2204],{"type":53,"value":2205},"ingest_report_json \u003Cfile> --team-id N",{"type":47,"tag":2112,"props":2207,"children":2208},{},[2209],{"type":53,"value":2210},"Seed a pre-researched report (skip sandbox)",{"type":47,"tag":56,"props":2212,"children":2214},{"id":2213},"key-file-locations",[2215],{"type":53,"value":2216},"Key file locations",{"type":47,"tag":1310,"props":2218,"children":2219},{},[2220,2231,2242,2253,2264,2275,2286,2297,2308],{"type":47,"tag":1314,"props":2221,"children":2222},{},[2223,2225],{"type":53,"value":2224},"Pipeline workflow definitions: ",{"type":47,"tag":71,"props":2226,"children":2228},{"className":2227},[],[2229],{"type":53,"value":2230},"products\u002Fsignals\u002Fbackend\u002Ftemporal\u002F",{"type":47,"tag":1314,"props":2232,"children":2233},{},[2234,2236],{"type":53,"value":2235},"Buffer workflow: ",{"type":47,"tag":71,"props":2237,"children":2239},{"className":2238},[],[2240],{"type":53,"value":2241},"products\u002Fsignals\u002Fbackend\u002Ftemporal\u002Fbuffer.py",{"type":47,"tag":1314,"props":2243,"children":2244},{},[2245,2247],{"type":53,"value":2246},"Grouping workflow: ",{"type":47,"tag":71,"props":2248,"children":2250},{"className":2249},[],[2251],{"type":53,"value":2252},"products\u002Fsignals\u002Fbackend\u002Ftemporal\u002Fgrouping_v2.py",{"type":47,"tag":1314,"props":2254,"children":2255},{},[2256,2258],{"type":53,"value":2257},"Report summary workflow: ",{"type":47,"tag":71,"props":2259,"children":2261},{"className":2260},[],[2262],{"type":53,"value":2263},"products\u002Fsignals\u002Fbackend\u002Ftemporal\u002Fsummary.py",{"type":47,"tag":1314,"props":2265,"children":2266},{},[2267,2269],{"type":53,"value":2268},"Docker sandbox implementation: ",{"type":47,"tag":71,"props":2270,"children":2272},{"className":2271},[],[2273],{"type":53,"value":2274},"products\u002Ftasks\u002Fbackend\u002Flogic\u002Fservices\u002Fdocker_sandbox.py",{"type":47,"tag":1314,"props":2276,"children":2277},{},[2278,2280],{"type":53,"value":2279},"Sandbox Dockerfiles: ",{"type":47,"tag":71,"props":2281,"children":2283},{"className":2282},[],[2284],{"type":53,"value":2285},"products\u002Ftasks\u002Fbackend\u002Fsandbox\u002Fimages\u002F",{"type":47,"tag":1314,"props":2287,"children":2288},{},[2289,2291],{"type":53,"value":2290},"Agent log polling: ",{"type":47,"tag":71,"props":2292,"children":2294},{"className":2293},[],[2295],{"type":53,"value":2296},"products\u002Ftasks\u002Fbackend\u002Flogic\u002Fservices\u002Fcustom_prompt_internals.py",{"type":47,"tag":1314,"props":2298,"children":2299},{},[2300,2302],{"type":53,"value":2301},"Cleanup command: ",{"type":47,"tag":71,"props":2303,"children":2305},{"className":2304},[],[2306],{"type":53,"value":2307},"products\u002Fsignals\u002Fbackend\u002Fmanagement\u002Fcommands\u002Fcleanup_signals.py",{"type":47,"tag":1314,"props":2309,"children":2310},{},[2311,2313],{"type":53,"value":2312},"Management command docs: ",{"type":47,"tag":71,"props":2314,"children":2316},{"className":2315},[],[2317],{"type":53,"value":2318},"products\u002Fsignals\u002Fbackend\u002Fmanagement\u002FCLAUDE.md",{"type":47,"tag":2320,"props":2321,"children":2322},"style",{},[2323],{"type":53,"value":2324},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2326,"total":2444},[2327,2344,2362,2379,2394,2408,2426],{"slug":2328,"name":2328,"fn":2329,"description":2330,"org":2331,"tags":2332,"stars":26,"repoUrl":27,"updatedAt":2343},"analyzing-experiment-session-replays","analyze session replays for PostHog experiments","Analyze session replay patterns across experiment variants to understand user behavior differences. Use when the user wants to see how users interact with different experiment variants, identify usability issues, compare behavior patterns between control and test groups, or get qualitative insights to complement quantitative experiment results.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2333,2336,2339,2340],{"name":2334,"slug":2335,"type":15},"Analytics","analytics",{"name":2337,"slug":2338,"type":15},"Design","design",{"name":9,"slug":8,"type":15},{"name":2341,"slug":2342,"type":15},"User Research","user-research","2026-04-06T18:44:38.291781",{"slug":2345,"name":2345,"fn":2346,"description":2347,"org":2348,"tags":2349,"stars":26,"repoUrl":27,"updatedAt":2361},"assessing-heatmaps","analyze page heatmaps and suggest improvements","Assesses what a page's heatmap is telling you and recommends concrete changes. Pulls click \u002F rageclick \u002F scroll-depth data for a URL, names the hot elements by cross-referencing autocapture events on the same page, and can create a saved heatmap the user opens in PostHog, then summarizes the behavior and proposes improvements.\nTRIGGER when: user asks what a heatmap shows, why people aren't clicking something, where users rage-click, how far they scroll, what to change on a page based on heatmap\u002Fclick data, or to 'analyze\u002Fassess\u002Freview the heatmap' for a URL.\nDO NOT TRIGGER when: the user only wants to create a saved heatmap screenshot with no analysis (use heatmaps-saved-create directly), or is asking about session replay in general (use investigating-replay).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2350,2351,2354,2355,2358],{"name":2334,"slug":2335,"type":15},{"name":2352,"slug":2353,"type":15},"Frontend","frontend",{"name":9,"slug":8,"type":15},{"name":2356,"slug":2357,"type":15},"Product Management","product-management",{"name":2359,"slug":2360,"type":15},"UX Design","ux-design","2026-06-05T07:40:43.37798",{"slug":2363,"name":2363,"fn":2364,"description":2365,"org":2366,"tags":2367,"stars":26,"repoUrl":27,"updatedAt":2378},"auditing-experiments-flags","audit PostHog experiments and feature flags","Audit PostHog experiments and feature flags for configuration issues, staleness, and best-practice violations. Read when the user asks to audit, health-check, or review experiments or feature flags, check flag hygiene, or verify experiment setup.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2368,2371,2374,2375],{"name":2369,"slug":2370,"type":15},"Audit","audit",{"name":2372,"slug":2373,"type":15},"Feature Flags","feature-flags",{"name":9,"slug":8,"type":15},{"name":2376,"slug":2377,"type":15},"QA","qa","2026-04-06T18:44:30.657553",{"slug":2380,"name":2380,"fn":2381,"description":2382,"org":2383,"tags":2384,"stars":26,"repoUrl":27,"updatedAt":2393},"authoring-scouts","author and edit PostHog Signals scouts","How to author, edit, and adapt PostHog Signals scouts — the scheduled agents that scan a project and write reports into the Signals inbox. Use when a user wants to customize a canonical scout for their own setup (narrow its scope, retune its thresholds, add disqualifiers), tweak a scout's schedule or dry-run posture, or write a brand-new scout from scratch for a specific use case (a custom event, a product surface no canonical scout covers), or steer a scout without editing it at all by leaving it a note. Covers the scout SKILL.md anatomy, the report contract, the dedupe + scratchpad-memory conventions, the scout-notes steering channel, the per-team skills-store path vs the canonical in-repo path, and the write-and-inspect test loop (with dry-run as an optional safety net). Trigger on \"write\u002Fedit\u002Fcustomize a signals scout\", \"new scout for X\", \"tune my scout schedule\", \"make a scout that watches \u003Cevent>\", \"leave a note for \u002F give feedback to a scout\", \"tell the scouts about X\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2385,2388,2391,2392],{"name":2386,"slug":2387,"type":15},"Agents","agents",{"name":2389,"slug":2390,"type":15},"Automation","automation",{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-07-28T05:33:45.509154",{"slug":2395,"name":2395,"fn":2396,"description":2397,"org":2398,"tags":2399,"stars":26,"repoUrl":27,"updatedAt":2407},"building-a-dashboard","build and update PostHog dashboards","Build a new dashboard, or update an existing one, from a set of insights — the same job the in-app assistant does with its upsert-dashboard tool, but over MCP. Use when a user asks to create a dashboard, put several metrics\u002Fcharts together on one page, assemble a dashboard for a topic (product analytics, retention, revenue, activation, etc.), or add\u002Fremove\u002Freplace insights on a dashboard they already have. Covers deciding create vs update, reusing existing insights vs creating new ones, and using PostHog's vetted dashboard templates as reference for what a strong dashboard on a topic looks like.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2400,2401,2404],{"name":2334,"slug":2335,"type":15},{"name":2402,"slug":2403,"type":15},"Dashboards","dashboards",{"name":2405,"slug":2406,"type":15},"MCP","mcp","2026-07-21T06:07:38.060598",{"slug":2409,"name":2409,"fn":2410,"description":2411,"org":2412,"tags":2413,"stars":26,"repoUrl":27,"updatedAt":2425},"checking-deploy-timing","correlate PostHog deployments with GitHub commits","Determine when a PostHog code change reached a given environment by reading the hidden GIT deploy annotations in the project and correlating them with the merge commit on GitHub. Use when PostHog staff ask \"when was X deployed\", \"is my change live in the US\u002FEU yet\", \"has my PR shipped\", \"did the fix roll out to prod-us\", or otherwise want to know whether\u002Fwhen a commit, PR, or feature went out to a region. Do not answer deploy-timing questions from event\u002Fdata volume alone — that only shows when data changed, not when code shipped.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2414,2417,2420,2423,2424],{"name":2415,"slug":2416,"type":15},"Deployment","deployment",{"name":2418,"slug":2419,"type":15},"Git","git",{"name":2421,"slug":2422,"type":15},"GitHub","github",{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-06-28T07:46:59.53536",{"slug":2427,"name":2427,"fn":2428,"description":2429,"org":2430,"tags":2431,"stars":26,"repoUrl":27,"updatedAt":2443},"choosing-trend-or-slope-view","visualize trends and growth over time","Clarify how to visualize change over a time range before building a trend. Use whenever the user asks how much something changed, grew, dropped, improved, or regressed between two points or periods — \"how much did X change from A to B\", \"before vs after\", \"start vs end\", \"week over week\", \"compare this month to last\", \"change over time\" — or mentions a \"slope chart\" \u002F \"slopegraph\". Two readings of \"change\" need different charts: the whole trend (a line, every interval) versus just the two endpoints (a slope, start vs end). Ask which they want, then render it. Not for choosing a saved insight ChartDisplayType in the insight editor.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2432,2433,2436,2439,2440],{"name":2334,"slug":2335,"type":15},{"name":2434,"slug":2435,"type":15},"Charts","charts",{"name":2437,"slug":2438,"type":15},"Data Visualization","data-visualization",{"name":9,"slug":8,"type":15},{"name":2441,"slug":2442,"type":15},"Reporting","reporting","2026-06-18T08:18:57.960157",56,{"items":2446,"total":2603},[2447,2462,2472,2485,2498,2511,2527,2540,2552,2567,2577,2593],{"slug":2448,"name":2448,"fn":2449,"description":2450,"org":2451,"tags":2452,"stars":2459,"repoUrl":2460,"updatedAt":2461},"analyzing-expensive-users","analyze expensive users in AI observability","Analyze the most expensive users in AI observability and explain why they cost so much. Use when the user asks about top spenders, expensive users, per-user LLM cost, user-level cost drivers, or patterns behind high AI observability spend.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2453,2454,2457,2458],{"name":2334,"slug":2335,"type":15},{"name":2455,"slug":2456,"type":15},"Cost Optimization","cost-optimization",{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},35568,"https:\u002F\u002Fgithub.com\u002FPostHog\u002Fposthog","2026-07-28T05:34:11.117757",{"slug":2463,"name":2463,"fn":2464,"description":2465,"org":2466,"tags":2467,"stars":2459,"repoUrl":2460,"updatedAt":2471},"auditing-endpoints","audit PostHog project endpoints","Audit every endpoint in a PostHog project for staleness, failed materialisations, and unused materialised versions. Use when the user asks \"what endpoints can I clean up?\", \"are any of my endpoints broken?\", \"which materialised versions are still being called?\", or wants a one-shot cleanup pass over the Endpoints product. Produces a prioritised report grouped by issue type, with recommended actions but does not modify anything without explicit confirmation.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2468,2469,2470],{"name":2334,"slug":2335,"type":15},{"name":2369,"slug":2370,"type":15},{"name":9,"slug":8,"type":15},"2026-06-08T08:08:33.693989",{"slug":2473,"name":2473,"fn":2474,"description":2475,"org":2476,"tags":2477,"stars":2459,"repoUrl":2460,"updatedAt":2484},"auditing-warehouse-source-health","audit PostHog data warehouse source health","Audit the health of a PostHog project's data warehouse sources and syncs — find every broken or degraded source connection, sync schema, and webhook channel. Use when the user asks \"why are my imports failing?\", \"what's broken with my sources?\", \"why is my warehouse data stale?\", or wants a one-shot triage of source\u002Fsync health before deciding where to dig in. Produces a prioritized report grouped by severity, with recommended next steps. For materialized-view health use `auditing-warehouse-view-health`; for a single failing sync use `diagnosing-failed-warehouse-syncs`.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2478,2479,2482,2483],{"name":2369,"slug":2370,"type":15},{"name":2480,"slug":2481,"type":15},"Data Warehouse","data-warehouse",{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-06-18T08:22:57.67984",{"slug":2486,"name":2486,"fn":2487,"description":2488,"org":2489,"tags":2490,"stars":2459,"repoUrl":2460,"updatedAt":2497},"auditing-warehouse-view-health","audit PostHog materialized view health","Audit the health of a PostHog project's materialized views (saved queries) — find every failed materialization and flag unused or stale materialized views that cost storage and compute. Use when the user asks \"which of my views are broken?\", \"why is this materialized view failing?\", \"are any of my views wasting compute?\", or wants a one-shot triage of view health. For source\u002Fsync health use `auditing-warehouse-source-health`.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2491,2492,2493,2496],{"name":2369,"slug":2370,"type":15},{"name":2480,"slug":2481,"type":15},{"name":2494,"slug":2495,"type":15},"Performance","performance",{"name":9,"slug":8,"type":15},"2026-06-18T08:25:10.936787",{"slug":2499,"name":2499,"fn":2500,"description":2501,"org":2502,"tags":2503,"stars":2459,"repoUrl":2460,"updatedAt":2510},"authoring-error-tracking-alerts","author PostHog error tracking alerts","Author error tracking alerts that fire when an issue is created, reopened, or starts spiking. Use when the user asks to set up error notifications, route exceptions to Slack\u002Fwebhook\u002FLinear, or evaluate which error events are worth alerting on. Covers trigger-event selection, integration choice, dedup against existing alerts, and shipping with the canonical message body shape.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2504,2507,2508,2509],{"name":2505,"slug":2506,"type":15},"Alerting","alerting",{"name":24,"slug":25,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-06-18T08:24:40.318583",{"slug":2512,"name":2512,"fn":2513,"description":2514,"org":2515,"tags":2516,"stars":2459,"repoUrl":2460,"updatedAt":2526},"authoring-log-alerts","author log alerts in PostHog","Author useful, low-noise log alerts on services in a PostHog project. Use when the user asks to set up alerts for their logs, suggest alerts they should add, or evaluate whether a service is worth monitoring. Covers service triage, baseline characterisation, threshold drafting, back-testing via simulate, and shipping with a notification destination.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2517,2518,2521,2522,2525],{"name":2334,"slug":2335,"type":15},{"name":2519,"slug":2520,"type":15},"Monitoring","monitoring",{"name":13,"slug":14,"type":15},{"name":2523,"slug":2524,"type":15},"Operations","operations",{"name":9,"slug":8,"type":15},"2026-07-18T05:10:54.430898",{"slug":2528,"name":2528,"fn":2529,"description":2530,"org":2531,"tags":2532,"stars":2459,"repoUrl":2460,"updatedAt":2539},"building-workflows","build and edit PostHog workflows","Build, edit, test, enable, and monitor PostHog workflows over MCP. Author the action\u002Fedge graph so it runs and opens cleanly in the visual editor, then change drafts surgically with patch operations. Use when asked to build, set up, automate, change, fix, or debug a workflow, campaign, broadcast, drip sequence, or event-triggered automation in the workflows product.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2533,2534,2535,2536],{"name":2389,"slug":2390,"type":15},{"name":2405,"slug":2406,"type":15},{"name":9,"slug":8,"type":15},{"name":2537,"slug":2538,"type":15},"Workflow Automation","workflow-automation","2026-07-28T05:34:12.167015",{"slug":2541,"name":2541,"fn":2542,"description":2543,"org":2544,"tags":2545,"stars":2459,"repoUrl":2460,"updatedAt":2551},"check-posthog-loading","inspect PostHog SDK loading across URLs","Inspect how the PostHog JavaScript SDK is loaded across a list of URLs. Use to confirm consistent installation across pages, find pages missing the snippet, detect mismatched API keys or hosts between pages, and verify the load method (head snippet vs deferred vs array.js).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2546,2547,2548,2549,2550],{"name":2334,"slug":2335,"type":15},{"name":24,"slug":25,"type":15},{"name":2352,"slug":2353,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-05-07T05:56:19.828048",{"slug":2553,"name":2553,"fn":2554,"description":2555,"org":2556,"tags":2557,"stars":2459,"repoUrl":2460,"updatedAt":2566},"consuming-endpoints-from-client-code","integrate PostHog endpoints into client applications","Wire a PostHog endpoint into a client app or SDK. Covers fetching the OpenAPI spec, generating a typed client with openapi-generator or @hey-api\u002Fopenapi-ts, sending the right auth header, shaping the variables payload (HogQL code_name vs insight breakdown property), handling rate-limit and materialised-endpoint error responses. Use when the user says \"how do I call my endpoint\", \"generate a client for this\", or \"what auth header do I use\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2558,2561,2562,2563],{"name":2559,"slug":2560,"type":15},"API Development","api-development",{"name":2352,"slug":2353,"type":15},{"name":9,"slug":8,"type":15},{"name":2564,"slug":2565,"type":15},"SDK","sdk","2026-06-08T08:08:34.929454",{"slug":2568,"name":2568,"fn":2569,"description":2570,"org":2571,"tags":2572,"stars":2459,"repoUrl":2460,"updatedAt":2576},"copying-endpoints-across-projects","copy PostHog endpoints across projects","Copy a PostHog endpoint (a saved HogQL\u002Finsight query exposed as an API route) to another project in the same organization, or duplicate it under a new name in the same project. Use when the user wants to duplicate an endpoint, promote an endpoint from staging to production, replicate an endpoint's query\u002Fvariables\u002Ffreshness config in another workspace, or clone an endpoint to iterate on it. Unlike feature flags and experiments, endpoints have NO native cross-project copy tool — this skill covers the read-then-recreate flow (endpoint-get then endpoint-create), the active-project switching it requires, name-collision checks, and the safe defaults (land unmaterialised in the target, verify with endpoint-run). Does not cover editing endpoint versions (see managing-endpoint-versions) or authoring a brand-new endpoint from scratch (see creating-an-endpoint).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2573,2574,2575],{"name":2559,"slug":2560,"type":15},{"name":2523,"slug":2524,"type":15},{"name":9,"slug":8,"type":15},"2026-07-15T05:29:58.442727",{"slug":2578,"name":2578,"fn":2579,"description":2580,"org":2581,"tags":2582,"stars":2459,"repoUrl":2460,"updatedAt":2592},"creating-ai-subscription","schedule recurring AI-generated PostHog reports","Create a recurring AI-generated PostHog report — schedule a free-text prompt to run on a cron, with the LLM-synthesized markdown delivered to email or Slack on each tick. Use when the user wants a recurring AI summary of X on any cadence (daily, weekly, monthly, yearly) rather than a one-off report. (To attach an AI summary to an existing insight\u002Fdashboard subscription instead of a free-text prompt, see `managing-subscriptions` and its `summary_enabled` option.)\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2583,2584,2587,2588,2589],{"name":2389,"slug":2390,"type":15},{"name":2585,"slug":2586,"type":15},"Email","email",{"name":9,"slug":8,"type":15},{"name":2441,"slug":2442,"type":15},{"name":2590,"slug":2591,"type":15},"Slack","slack","2026-06-09T07:32:27.935712",{"slug":2594,"name":2594,"fn":2595,"description":2596,"org":2597,"tags":2598,"stars":2459,"repoUrl":2460,"updatedAt":2602},"creating-an-endpoint","create PostHog API endpoints","Create a PostHog endpoint with the right shape on the first try — covers query kind choice, name conventions, what to expose as variables (HogQL code_name vs insight breakdown), data_freshness_seconds, and whether to materialise on day one. Use when the user says \"create an endpoint\", \"expose this query as an API\", \"turn this insight into an endpoint\", or asks for help structuring a new endpoint. Steers away from common mistakes: materialising a query with cohort breakdowns or compare mode, inline-only variables on a materialised endpoint, unbounded date ranges, ambiguous names.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2599,2600,2601],{"name":2334,"slug":2335,"type":15},{"name":2559,"slug":2560,"type":15},{"name":9,"slug":8,"type":15},"2026-06-08T08:08:29.624498",231]