: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
feat(mcp): detect grok as single-exec client (#66208)
Chris Volzer5cbc77315af2
diff --git a/services/mcp/src/lib/client-detection.ts b/services/mcp/src/lib/client-detection.tsindex 7dc53044a314..45b93ccf5481 100644--- a/services/mcp/src/lib/client-detection.ts+++ b/services/mcp/src/lib/client-detection.ts@@ -88,6 +88,11 @@ export const CODING_AGENT_CLIENT_NAME_FRAGMENTS = [// Poke is an LLM-driven assistant that renders text, not MCP Apps UI, so it// wants the same single-exec mode as the coding agents.'poke',+ // Grok (xAI) — both Grok Build (the terminal coding agent) and the grok.com+ // assistant connect custom MCP servers and render text rather than MCP Apps+ // UI, so they benefit from the same single-exec mode and formatted-text+ // rendering as the other coding agents.+ 'grok',] as const// Known `x-anthropic-client` (`vendorClient`) header values. Anthropic poolsdiff --git a/services/mcp/tests/unit/client-detection.test.ts b/services/mcp/tests/unit/client-detection.test.tsindex 7b1f1923da6c..068d8df0ba70 100644--- a/services/mcp/tests/unit/client-detection.test.ts+++ b/services/mcp/tests/unit/client-detection.test.ts@@ -36,6 +36,7 @@ describe('isCliModeEnabledClient', () => {['opencode'],['amp-mcp-client'],['poke'],+ ['grok'],])('returns true for %s', (clientName) => {expect(isCliModeEnabledClient(clientName)).toBe(true)})@@ -63,6 +64,9 @@ describe('isCliModeEnabledClient', () => {['opencode/1.2.3'],['Amp MCP Client'],['Poke'],+ ['Grok'],+ ['grok-build'],+ ['Grok/1.2.3'],])('returns true for variant %s (case-insensitive substring match)', (clientName) => {expect(isCliModeEnabledClient(clientName)).toBe(true)})