Skip to content

codegraph index fails with "database file is in use" when MCP server is still running #1325

Description

@bithy0825

Environment

  • OS: Windows 11 (Git Bash)
  • Codegraph: 1.4.1

Steps to Reproduce

  1. Install codegraph MCP into Claude Code: codegraph install
  2. Use Claude Code normally
  3. Exit Claude Code (either via /exit or by closing the window directly)
  4. Try to rebuild the index: codegraph index

Expected

The index rebuilds successfully.

Actual

[ERR] Failed to index: Could not rebuild the index — the database file is in use
(EPERM, Permission denied: \\?\E:\workspace\aod\.codegraph\codegraph.db)

Additional Context

After exiting Claude Code (both /exit and closing the window), the MCP server process remains running on my machine. codegraph index continues to fail until I manually end the "Node.js JavaScript Runtime" process via Task Manager. After doing so, codegraph index succeeds.

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