:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(signals): note exec routing for scout tool calls in harness prompt (#69137)
posthog[bot]33630ae4e7c2
diff --git a/products/signals/backend/scout_harness/prompt.py b/products/signals/backend/scout_harness/prompt.pyindex c2fd9996eae2..dd55011f3b64 100644--- a/products/signals/backend/scout_harness/prompt.py+++ b/products/signals/backend/scout_harness/prompt.py@@ -405,6 +405,10 @@ def build_run_prompt(skill: LoadedSkill, *, run_id: str, team_id: int, started_a- **skill**: `{skill.name}` (v{skill.version}) — your steering layer.- **started_at**: `{started_at_iso}` — when this run began (UTC). Informational; use current clock time for queries about "now".+# How to call tools++Every tool named in this prompt — the `signals-scout-*` harness tools and all PostHog MCP tools — is invoked through the `mcp__posthog__exec` interface as `call <tool_name> <json>`, not as a direct tool call. The bare names below (`skill-get`, `signals-scout-project-profile-get`, `{emit_tool}`, …) are how you *refer* to a tool; you reach one through `exec`. For any tool you haven't already used, discover and inspect it first on that same interface — `search <regex>` to find it, `info <tool_name>` to read its schema — then `call` it. Don't burn opening moves trying to invoke these names directly; they resolve only through `exec`.+# First: read your skillYour bound skill is the brain of this run. Before doing anything else, call:diff --git a/products/signals/backend/test/test_scout_harness.py b/products/signals/backend/test/test_scout_harness.pyindex 7332297813b6..e56045d73af6 100644--- a/products/signals/backend/test/test_scout_harness.py+++ b/products/signals/backend/test/test_scout_harness.py@@ -155,6 +155,11 @@ class TestPromptBuilder(BaseTest):assert "(v1)" in prompt# The agent needs to know its own run id to attribute emits and memories.assert "00000000-0000-0000-0000-000000000abc" in prompt+ # Calling convention is stated up front: bare tool names resolve only+ # through the exec interface, so the agent doesn't burn opening moves+ # trying to invoke them directly.+ assert "How to call tools" in prompt+ assert "mcp__posthog__exec" in prompt# Bootstrap section directs the agent to read the skill via MCP, not# from the prompt. Skill body + file manifest are deliberately NOT# inlined — they're discovered at run time.