Skip to content

[codex] Fix Claude installer and MCP context issues#600

Open
Ununp3ntium115 wants to merge 1 commit into
colbymchenry:mainfrom
Ununp3ntium115:codex/fix-claude-issue-reports
Open

[codex] Fix Claude installer and MCP context issues#600
Ununp3ntium115 wants to merge 1 commit into
colbymchenry:mainfrom
Ununp3ntium115:codex/fix-claude-issue-reports

Conversation

@Ununp3ntium115
Copy link
Copy Markdown

Summary

This PR fixes the Claude-facing issue reports by tightening the installer, permissions, MCP tool guidance, and ArkTS file detection:

  • Add mcp__codegraph__codegraph_files to Claude auto-allow permissions so the newly exposed file-list tool is actually usable after install.
  • Create best-effort .backup / .backup.N files before installer overwrites existing agent config, including corrupted JSON recovery paths.
  • Reword codegraph_context schema and server instructions so agents pass short symbols, routes, filenames, API names, or keyword fragments instead of verbose prose tasks.
  • Map ArkTS .ets files to the TypeScript grammar for first-pass indexing, with source-file detection coverage.

Issue Mapping

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_context combines 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 .ets mapping 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.ts
    • 5 files passed, 459 passed, 2 skipped
  • npm run build
  • git diff --check

Notes

This PR intentionally keeps the Claude changes separate from the macOS/path fixes so each issue group can be reviewed and merged independently.

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.
@Ununp3ntium115 Ununp3ntium115 marked this pull request as ready for review May 31, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant