From the Inside Claude Code - The Claude Code Ecosystem architecture map

PR-controlled agent config is restored from the base branch before Claude starts

strength · medium · verified

On pull requests run.ts calls restoreConfigFromBase, which replaces .claude, .mcp.json, .claude.json, CLAUDE.md, CLAUDE.local.md, .gitmodules, .ripgreprc and .husky with the base branch versions. A PR therefore cannot add hooks, MCP servers or instructions to the agent that reviews it.

SENSITIVE_PATHS in src/github/operations/restore-config.ts must grow whenever Claude Code starts reading a new file from the working directory at startup.

The trail

  1. Run Orchestrator
  2. Sensitive Config Restore
Open on the map

More from this board