- As a session starts: the outline of your whole project.
- After it reads a file: where the file sits, and what other areas use from it.
- After it edits a file: what changed, and the code that depends on it.
As a session starts
The outline is in the MCP server’s instructions. Claude Code reads them as a session starts, before your first question; Codex gives them to its model as the description of ShadowGit’s tools. It holds your project’s areas, the links between them that carry the most calls and imports, its processes and your rules, in up to about 2,200 characters.:Outline
get_code_context, the dependents in the answer come with the line where they use the code, where the map has one (a use at a file’s top level has none), so it sees how callers use a function without opening each file. In Claude Code, that tool is also ready from the first prompt instead of waiting to be found.
As it reads and edits

Claude Code's row in Get started, with the switch on
After a read
get_code_context lists the rest:
After an edit
What the switch writes
Both need version 2.11.0 or later of the MCP server, the highest ShadowGit has heard from that assistant. The switch adds one entry after the hooks you have, and turning it off takes out exactly that entry; the rest of the file keeps what it holds. A file that isn’t plain JSON is never touched: the row says so, and names it. If you keep Codex’s hooks in
config.toml, Codex warns at start that hooks are in two places, and runs both.
Both assistants read their hooks when a session starts, so a session already open gets them after a restart. Codex also asks you to review a new hook the next time it starts: choose Trust all and continue, or Review hooks.
The MCP server’s README has the entries, to set them up by hand.
Does it help?
We measured it before choosing the default: 690 runs of 23 change tasks in three real projects, each checked by its typecheck, its tests and tests the assistant never saw.
Codex passed 100% without ShadowGit and 99% with 2.11.0 and its hook. Every setup passed nearly every task. 2.11.0 passed as often as 2.10.0 (a difference of 0.0 points, within −2.6 and +2.6) at about the same median cost (×1.01): no sign that it helps, and none that it hurts by more than that interval. The hooks didn’t help either, 1.7 points lower if anything (within −4.3 and 0.0), so they’re yours to try, off by default.
Privacy
The facts come from the map on your computer, and ShadowGit sends none of them anywhere. What your assistant reads goes to your AI provider, like any file it opens. ShadowGit’s usage data counts how many facts were delivered and how long they took, never a path, a symbol’s name or code.Troubleshooting
Claude Code shows a “hook error” notice
The hooks run in every Claude Code session, and need theshadowgit MCP server connected in it. In a session where it isn’t (it was removed, turned off in /mcp, or hadn’t started yet), or when ShadowGit didn’t answer in time, Claude Code shows a notice and goes on. Turn the switch off in ShadowGit to remove the hooks.
The switch asks for a newer MCP server
Your assistant started the MCP server before 2.11.0 was out. Restart your assistant, ask it something so ShadowGit hears the new version, then turn the switch on again.The switch asks for a newer Claude Code or Codex
Update it (claude update, or your package manager for Codex), then turn the switch on again.
