Skip to content

detect_changes fails on Windows paths with spaces ("project path contains invalid characters") #138

@shekthesnek

Description

@shekthesnek

Bug Report

Version: v0.5.6 (2026-03-23)
Platform: Windows 11 Home (amd64), Git Bash

Problem

detect_changes returns "project path contains invalid characters" when the project path contains spaces.

Steps to Reproduce

  1. Index a project at a path with spaces:
index_repository(repo_path="C:\Users\abish\OneDrive - PomeGran Inc\Files\kpi-dashboard")

✅ Succeeds — 6,256 nodes, 10,255 edges

  1. Call detect_changes:
detect_changes(project="C-Users-abish-OneDrive - PomeGran Inc-Files-kpi-dashboard", depth=2)

❌ Returns: "project path contains invalid characters"

Expected

detect_changes should handle paths with spaces, same as the other 12 working tools.

Working Tools (same path)

All of these work correctly with the same space-containing path:

  • index_repository
  • list_projects
  • index_status
  • get_graph_schema
  • get_architecture
  • search_graph
  • trace_call_path
  • get_code_snippet
  • query_graph
  • manage_adr
  • ingest_traces

Only detect_changes and search_code (#133) fail.

Likely Cause

detect_changes probably shells out to git diff without properly quoting the root_path that contains spaces. Similar to previously fixed issues #80, #121.

Environment

  • OS: Windows 11 Home 10.0.28020
  • Shell: Git Bash (MSYS2)
  • Path: C:\Users\abish\OneDrive - PomeGran Inc\Files\kpi-dashboard
  • Binary: ~/.local/bin/codebase-memory-mcp.exe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions