[codex] Fix Claude installer and MCP context issues#600
Open
Ununp3ntium115 wants to merge 1 commit into
Open
Conversation
Add codegraph_files to Claude auto-allow, create non-destructive config backups, clarify codegraph_context as a keyword-backed lookup, and map ArkTS .ets files to the TypeScript grammar. Refs colbymchenry#565 colbymchenry#486 colbymchenry#571 colbymchenry#512.
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.
Summary
This PR fixes the Claude-facing issue reports by tightening the installer, permissions, MCP tool guidance, and ArkTS file detection:
mcp__codegraph__codegraph_filesto Claude auto-allow permissions so the newly exposed file-list tool is actually usable after install..backup/.backup.Nfiles before installer overwrites existing agent config, including corrupted JSON recovery paths.codegraph_contextschema and server instructions so agents pass short symbols, routes, filenames, API names, or keyword fragments instead of verbose prose tasks..etsfiles to the TypeScript grammar for first-pass indexing, with source-file detection coverage.Issue Mapping
codegraph_filesdespite the README/manual Claude example including it #565: Claude auto-allow now includescodegraph_files.codegraph_contextis documented as keyword-backed and no longer framed as the first tool for arbitrary natural-language tasks..etsfiles are recognized as TypeScript-compatible source files.Root Cause
The Claude installer permission list had drifted from the MCP tool surface, so installed Claude configs could omit a tool that CodeGraph now exposes. The shared installer writer also wrote atomically but did not preserve prior content before replacing config files, which made recovery poor when the installer had to rewrite existing config.
Separately,
codegraph_contextcombines search and graph expansion, but its schema and instructions described it as accepting broad task descriptions. That encouraged agents to send natural-language prompts into a keyword-backed lookup, reducing result quality. ArkTS files were also skipped because extension detection had no.etsmapping even though the TypeScript grammar is an acceptable first-pass parser for common ArkTS syntax.Validation
npx -y -p node@22 node ./node_modules/vitest/vitest.mjs run __tests__/installer.test.ts __tests__/installer-targets.test.ts __tests__/security.test.ts __tests__/extraction.test.ts __tests__/mcp-tool-allowlist.test.tsnpm run buildgit diff --checkNotes
This PR intentionally keeps the Claude changes separate from the macOS/path fixes so each issue group can be reviewed and merged independently.