From a894086edbc8ac04e48df13732e74876266de5f1 Mon Sep 17 00:00:00 2001 From: William Weishuhn Date: Wed, 25 Mar 2026 11:06:07 -0700 Subject: [PATCH] fix: await collectUserIdentity to prevent null enrichment fields The identity collection (gitEmail, gitRemoteUrl, hostname) was fire-and-forget, causing a race condition where short-running commands would emit telemetry before the identity cache populated. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/cli.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli.ts b/src/cli.ts index 1838adb..6cb704c 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -195,7 +195,7 @@ async function main(): Promise { // Telemetry: load config and warm identity cache in background await loadTelemetryConfig(); - collectUserIdentity().catch(() => {}); + await collectUserIdentity().catch(() => {}); // Update check (CLI only, not MCP server mode) if (process.argv[2] !== "serve") {