fix(codegraph): non-interactive install, PATH/MCP recovery guidance, gitignore .codegraph/#1
Merged
itsarvinddev merged 1 commit intoJun 7, 2026
Conversation
…gitignore .codegraph/ Three fixes grounded in a real first-run setup, where the codegraph_* MCP tools silently failed to load after following the policy verbatim: 1. Recommend `codegraph install -y` everywhere (codegraph-policy.md + codegraph-session-check.sh). A bare `codegraph install` opens an interactive agent-picker prompt that has no TTY in an agent context and hangs session startup. 2. Add a post-restart verification step to the policy + hook message. The CLI installer links the binary into ~/.local/bin, which is often not on the PATH a GUI-launched agent inherits, so the MCP server registered as the bare command "codegraph" fails to spawn silently. Guidance: verify the tools loaded, and if not, add ~/.local/bin to PATH or re-register the MCP entry's command with the absolute binary path. 3. Auto-gitignore .codegraph/ on project installs (mirrors the existing primer_gitignore). `codegraph init -i` writes a per-machine index that must not be committed on a team-shared project install. Regenerated agent-primer.sh via make-portable.sh; added a smoke assertion. All 62 smoke checks pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
itsarvinddev
added a commit
that referenced
this pull request
Jun 7, 2026
…leanup fix(codegraph): index-db check + safe Gemini fileName cleanup (Tier-3, stacked on #1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Three fixes grounded in a real first-run setup of this kit (Claude Code, global install). After following
codegraph-policy.mdverbatim, thecodegraph_*MCP tools silently failed to load, and one step hung the agent. Each change addresses one of those.1.
codegraph installhangs the agent → recommendcodegraph install -yThe decision tree and install table tell the agent to run
codegraph install. That command (CodeGraph v0.9.9) opens an interactive "Which agents should CodeGraph configure?" multi-select, which has no TTY in an agent context and blocks session startup (I had topkillit).-yruns non-interactively (global + auto-detect). Updated incodegraph-policy.mdand the messagecodegraph-session-check.shemits.2. MCP server silently never loads (PATH mismatch) → add a verify-after-restart step
The CodeGraph CLI installer links the binary into
~/.local/bin(and warns it isn't on PATH).codegraph installthen registers the server as the bare command"codegraph". GUI-launched agents (VS Code / desktop) don't inherit the shell PATH, so the server fails to spawn — no error, no tools, looks like setup just didn't work.Added a "VERIFY the tools actually loaded" step to the restart reality section + the hook message: if missing, find the real binary, then either add
~/.local/binto PATH or rewrite the MCP entry'scommandto the absolute path (the more robust fix, since it doesn't depend on the agent's PATH).3. Project installs don't gitignore
.codegraph/install.shalready gitignores.primer/on project installs, but the policy has the agent runcodegraph init -i, which writes a per-machine.codegraph/index at the repo root. CodeGraph drops its own.codegraph/.gitignorethat self-ignores the heavy/volatile files (*.db,*.log,cache/) — but notdaemon.sock(a unix socket!),daemon.pid, or that internal.gitignoreitself, so on a team-shared project install those still get committed. Ignoring the whole.codegraph/at the repo root is the clean fix. Addedcodegraph_gitignore()(mirrorsprimer_gitignore), called on project scope, + a smoke assertion.Testing
agent-primer.shviamake-portable.sh(the bundle-drift smoke check stays green).tests/smoke.sh: 62 passed, 0 failed (incl. the new.codegraph/gitignore check; primer wiring tests skipped — no Node 22.13/build, as expected).Notes
-yis CodeGraph v0.9.9's flag for non-interactive global+auto install.fileNamecleanup).🤖 Generated with Claude Code