thedotmack/claude-mem · warning

Git Bash not found. claude-mem hooks require bash, and…

Error message

Git Bash not found. claude-mem hooks require bash, and Claude Code resolves it via Git for Windows on Windows. Install Git for Windows (https://git-scm.com/download/win), or if bash is installed somewhere non-standard, set CLAUDE_CODE_GIT_BASH_PATH to the full path of bash.exe.

What it means

On Windows, claude-mem hooks execute through bash, which Claude Code locates via Git for Windows. During install, checkWindowsGitBash() probes for bash.exe; if not found, the installer warns with instructions rather than hard-failing, because Git for Windows can be installed later and hooks will start working without reinstalling claude-mem.

Solutions

  1. Install Git for Windows from https://git-scm.com/download/win, then rerun or just restart Claude Code.
  2. If bash.exe is installed somewhere non-standard, set the CLAUDE_CODE_GIT_BASH_PATH environment variable to its full path (e.g. C:\tools\git\bin\bash.exe).
  3. Verify with `where bash` / `"%CLAUDE_CODE_GIT_BASH_PATH%" --version` that bash resolves before running hooks.

Example fix

// before
set CLAUDE_CODE_GIT_BASH_PATH=
// after (system environment variable)
setx CLAUDE_CODE_GIT_BASH_PATH "C:\Program Files\Git\bin\bash.exe"
Defensive patterns

Strategy: validation

Validate before calling

if (process.platform === 'win32') {
  const bash = process.env.CLAUDE_CODE_GIT_BASH_PATH ?? 'C:\\Program Files\\Git\\bin\\bash.exe';
  if (!fs.existsSync(bash)) {
    console.warn(`bash.exe not found at ${bash}; install Git for Windows or set CLAUDE_CODE_GIT_BASH_PATH.`);
  }
}

Prevention

When it happens

Trigger: IS_WINDOWS is true and `checkWindowsGitBash()` returns ok:false — Git for Windows is not installed, or bash.exe is at a non-standard path not covered by CLAUDE_CODE_GIT_BASH_PATH.

Common situations: Windows machines without Git installed; portable/custom Git installs outside standard Program Files locations; environments where only WSL git exists (not Git for Windows).

Understand the failure class

Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.

Related errors


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

Appendix: source

Thrown at src/npx-cli/commands/install.ts:2028

  const dot = styleText('dim', '·');
  const segments = [`${styleText('bold', 'claude-mem')} ${styleText('cyan', `v${version}`)}`];
  if (existingVersion && existingVersion !== version) {
    segments.push(`installed ${styleText('yellow', `v${existingVersion}`)}`);
  } else if (existingVersion) {
    segments.push(styleText('dim', 'reinstall'));
  }
  log.info(segments.join(` ${dot} `));

  // All claude-mem hooks run via `"shell": "bash"`; on Windows, Claude Code
  // resolves that through Git for Windows with no WSL fallback. Surfacing it
  // here — rather than letting the first hook throw an unbranded error — is
  // a warning, not a hard stop: the operator may install Git for Windows
  // after this run and hooks will start working without a reinstall.
  if (IS_WINDOWS) {
    const gitBash = checkWindowsGitBash();
    if (!gitBash.ok) {
      log.warn(gitBash.detail);
    }
  }

  if (alreadyInstalled) {
    if (process.stdin.isTTY) {
      const shouldContinue = await p.confirm({
        message: 'Overwrite existing installation?',
        initialValue: true,
      });

      if (p.isCancel(shouldContinue) || !shouldContinue) {
        p.cancel('Installation cancelled.');
        process.exit(0);
      }
    }
  }

  let selectedIDEs: string[];

View on GitHub (pinned to d8bc9755e7)