{"record":{"id":"0948c19473cb0b2e","repo":"thedotmack/claude-mem","slug":"warning-antigravity-cli-hook-path-contains-spaces-and-8-3","errorCode":null,"errorMessage":"  WARNING: Antigravity CLI hook path contains spaces and 8.3 short-path\n  resolution failed: ${filePath}\n  agy splits commands on spaces, so hooks may fail to launch.","messagePattern":"  WARNING: Antigravity CLI hook path contains spaces and 8\\.3 short-path\n  resolution failed: (.+?)\n  agy splits commands on spaces, so hooks may fail to launch\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/services/integrations/AntigravityCliHooksInstaller.ts","lineNumber":123,"sourceCode":"    console.warn(\n      `  WARNING: Antigravity CLI hook path contains spaces: ${filePath}\\n` +\n      `  agy splits commands on spaces, so hooks may fail to launch.\\n` +\n      `  Move bun or the plugin to a path without spaces.`,\n    );\n    return filePath;\n  }\n  try {\n    const shortPath = execSync(\n      `for %~I in (\"${filePath}\") do @echo %~sI`,\n      { shell: 'cmd.exe', encoding: 'utf-8', stdio: ['pipe', 'pipe', 'ignore'] },\n    ).trim();\n    if (shortPath && !shortPath.includes(' ')) return shortPath;\n  } catch (error) {\n    if (error instanceof Error) {\n      logger.error('WORKER', 'Failed to resolve Windows 8.3 short path', { path: filePath }, error);\n    }\n  }\n  console.warn(\n    `  WARNING: Antigravity CLI hook path contains spaces and 8.3 short-path\\n` +\n    `  resolution failed: ${filePath}\\n` +\n    `  agy splits commands on spaces, so hooks may fail to launch.`,\n  );\n  return filePath;\n}\n\nfunction buildHookCommand(\n  bunPath: string,\n  workerServicePath: string,\n  antigravityEventName: string,\n): string {\n  const internalEvent = ANTIGRAVITY_EVENT_TO_INTERNAL_EVENT[antigravityEventName];\n  if (!internalEvent) {\n    throw new Error(`Unknown Antigravity CLI event: ${antigravityEventName}`);\n  }\n\n  // Emit bare, forward-slashed paths (see toSpaceFreePath): agy does not run the","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/d8bc9755e74915e5c3b999181e10a67c889bce2a/src/services/integrations/AntigravityCliHooksInstaller.ts#L105-L141","documentation":"On Windows, the Antigravity CLI hooks installer resolves an 8.3 short path (via fs short-path APIs/cmd) to strip spaces from hook command paths, because agy splits commands on spaces. When the path contains spaces AND 8.3 short-path resolution fails (e.g. 8.3 name generation is disabled on the volume), the installer logs this warning, records the resolution failure via logger.error, and falls back to the raw spaced path rather than blocking the install.","triggerScenarios":"toSpaceFreePath on win32 where the resolved 8.3 short path is empty or itself contains a space; the underlying short-path call throws (caught and logged as 'Failed to resolve Windows 8.3 short path').","commonSituations":"Windows volumes with fsutil 8dot3name disabled (common on newer Windows installs and some drives); plugin or bun under 'C:\\Users\\John Smith\\AppData\\...' style paths on such volumes.","solutions":["Enable 8.3 filename generation on the volume: fsutil 8dot3name set <drive>: 0, then reinstall (registry NtfsDisable8dot3NameCreation)","Move bun and the plugin to a space-free directory (e.g. C:\\claude-mem) and reinstall","Verify the resulting hook command launches manually with agy after install"],"exampleFix":"// before (admin cmd): 8.3 names disabled\nfsutil 8dot3name query C:\n// after: enable 8.3 names on C: and reinstall\nfsutil 8dot3name set C: 0","handlingStrategy":"fallback","validationCode":"import { execSync } from 'child_process';\nconst out = execSync('fsutil 8dot3name query C:').toString();\nif (/disabled/i.test(out)) console.warn('8.3 names disabled; spaced paths cannot be shortened');","typeGuard":"function isShortPathUsable(p: string | null | undefined): p is string {\n  return typeof p === 'string' && p.length > 0 && !p.includes(' ');\n}","tryCatchPattern":"let installPath = filePath;\nif (filePath.includes(' ')) {\n  const short = resolveShortPath(filePath); // may return null\n  installPath = isShortPathUsable(short) ? short : warnAndUseRaw(filePath);\n}","preventionTips":["Enable 8.3 name generation on the Windows volume (fsutil 8dot3name set <drive>: 0)","Install bun and the plugin under space-free Windows paths (C:\\claude-mem)","Test hook launching with agy after install on Windows","Keep AppData-style spaced paths out of hook commands"],"tags":["windows","paths","installer","short-path"],"backgroundTag":"path-with-spaces","analyzedSha":"d8bc9755e74915e5c3b999181e10a67c889bce2a","analyzedAt":"2026-09-17T16:40:26.182Z","contentChangedAt":"2026-09-17T16:40:26.182Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}