Skip to content

: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.

fix(desktop): use task-scoped context wiki tools (#94640)

Dylan Martin70385a858644
diff --git a/products/desktop/packages/ui/src/features/canvas/contextPrompt.test.ts b/products/desktop/packages/ui/src/features/canvas/contextPrompt.test.ts
index cacfb025b39b..ed43bec465ec 100644
--- a/products/desktop/packages/ui/src/features/canvas/contextPrompt.test.ts
+++ b/products/desktop/packages/ui/src/features/canvas/contextPrompt.test.ts
@@ -14,9 +14,9 @@ describe("buildContextGenerationPrompt", () => {
contextLayerEnabled: true,
});
- expect(prompt).toContain("context-wiki-channel-resolve");
- expect(prompt).toContain("context-wiki-page-retrieve");
- expect(prompt).toContain("context-wiki-page-update");
+ expect(prompt).toContain("task-context-wiki-channel-resolve");
+ expect(prompt).toContain("task-context-wiki-page-retrieve");
+ expect(prompt).toContain("task-context-wiki-page-update");
expect(prompt).toContain(`channel_id: ${input.channelId}`);
expect(prompt).not.toContain("channel-instructions-update");
expect(prompt).toContain("Do not call any `loop-*` context tool");
diff --git a/products/desktop/packages/ui/src/features/canvas/contextPrompt.ts b/products/desktop/packages/ui/src/features/canvas/contextPrompt.ts
index b32feda74036..d03c476ef14f 100644
--- a/products/desktop/packages/ui/src/features/canvas/contextPrompt.ts
+++ b/products/desktop/packages/ui/src/features/canvas/contextPrompt.ts
@@ -47,15 +47,15 @@ then verify and fill it out against the sources below.\n`
: "";
const publishInstructions = contextLayerEnabled
? `Then PUBLISH the document yourself — don't stop to ask for approval first:
-1. Call the PostHog MCP tool \`context-wiki-channel-resolve\` with channel_id
+1. Call the PostHog MCP tool \`task-context-wiki-channel-resolve\` with channel_id
"${channelId}". Use the returned path exactly; never derive it from the space name.
-2. If \`exists\` is true, read the page with \`context-wiki-page-retrieve\` and
+2. If \`exists\` is true, read the page with \`task-context-wiki-page-retrieve\` and
preserve its frontmatter plus anything still true. Use its \`head_sha\` as
\`base_head\`. If \`exists\` is false, create the page at the returned path,
omit \`base_head\`, and include frontmatter with \`summary\`, \`status: active\`,
\`team_id\` from the returned project path, \`channel_id: ${channelId}\`, and
\`sources: initial-context-generation\`.
-3. Call \`context-wiki-page-update\` exactly once with the complete Markdown.
+3. Call \`task-context-wiki-page-update\` exactly once with the complete Markdown.
Do not call any \`loop-*\` context tool. Those tools are only for loop runs.`
: `Then PUBLISH the document yourself — don't stop to ask for approval first — by