thedotmack/claude-mem · warning

WARNING: Antigravity CLI hook path contains spaces and 8.3…

Error message

  WARNING: Antigravity CLI hook path contains spaces and 8.3 short-path
  resolution failed: ${filePath}
  agy splits commands on spaces, so hooks may fail to launch.

What it means

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.

Solutions

  1. Enable 8.3 filename generation on the volume: fsutil 8dot3name set <drive>: 0, then reinstall (registry NtfsDisable8dot3NameCreation)
  2. Move bun and the plugin to a space-free directory (e.g. C:\claude-mem) and reinstall
  3. Verify the resulting hook command launches manually with agy after install

Example fix

// before (admin cmd): 8.3 names disabled
fsutil 8dot3name query C:
// after: enable 8.3 names on C: and reinstall
fsutil 8dot3name set C: 0
Defensive patterns

Strategy: fallback

Validate before calling

import { execSync } from 'child_process';
const out = execSync('fsutil 8dot3name query C:').toString();
if (/disabled/i.test(out)) console.warn('8.3 names disabled; spaced paths cannot be shortened');

Type guard

function isShortPathUsable(p: string | null | undefined): p is string {
  return typeof p === 'string' && p.length > 0 && !p.includes(' ');
}

Try / catch

let installPath = filePath;
if (filePath.includes(' ')) {
  const short = resolveShortPath(filePath); // may return null
  installPath = isShortPathUsable(short) ? short : warnAndUseRaw(filePath);
}

Prevention

When it happens

Trigger: 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').

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

Related errors


AI-assisted analysis of thedotmack/claude-mem@d8bc9755e7 (2026-09-17). Data as JSON: /api/errors/0948c19473cb0b2e. Report an issue: GitHub.

Appendix: source

Thrown at src/services/integrations/AntigravityCliHooksInstaller.ts:123

    console.warn(
      `  WARNING: Antigravity CLI hook path contains spaces: ${filePath}\n` +
      `  agy splits commands on spaces, so hooks may fail to launch.\n` +
      `  Move bun or the plugin to a path without spaces.`,
    );
    return filePath;
  }
  try {
    const shortPath = execSync(
      `for %~I in ("${filePath}") do @echo %~sI`,
      { shell: 'cmd.exe', encoding: 'utf-8', stdio: ['pipe', 'pipe', 'ignore'] },
    ).trim();
    if (shortPath && !shortPath.includes(' ')) return shortPath;
  } catch (error) {
    if (error instanceof Error) {
      logger.error('WORKER', 'Failed to resolve Windows 8.3 short path', { path: filePath }, error);
    }
  }
  console.warn(
    `  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.`,
  );
  return filePath;
}

function buildHookCommand(
  bunPath: string,
  workerServicePath: string,
  antigravityEventName: string,
): string {
  const internalEvent = ANTIGRAVITY_EVENT_TO_INTERNAL_EVENT[antigravityEventName];
  if (!internalEvent) {
    throw new Error(`Unknown Antigravity CLI event: ${antigravityEventName}`);
  }

  // Emit bare, forward-slashed paths (see toSpaceFreePath): agy does not run the

View on GitHub (pinned to d8bc9755e7)