{"name":"CLAUDE_CODE_BASE_REFS","slug":"claude-code-base-refs","family":"env","title":"Environment variables","noun":"environment variable","description":"Map from checkout name to git ref, keyed like `CLAUDE_CODE_REPO_CHECKOUTS` (checkout name to path); entries whose value is not a string are dropped, and a parse failure is logged and leaves the map empty. When Claude Code computes a Write or Edit diff for a file inside a listed checkout, that checkout's ref is used as the diff base in place of `CLAUDE_CODE_BASE_REF`. It is parsed once per session, and Claude Code's bridge clears it from the environment of the sessions it spawns.","description_source":"code","described_by":{"bundle":"2.1.286","author":"claude-opus-5-5"},"presence":{"first_seen":"2.1.138","removed_in":null,"in_current_build":true,"newest_mined":"2.1.309","builds":150,"mined_builds":150,"first_cited":{"version":"2.1.105","released_at":"2026-04-13 19:51:19","spans":1}},"aliases":[],"entries":[{"version":"2.1.105","anchor":"multi-repository-checkout-support","heading":"Multi-Repository Checkout Support","line":null,"released_at":"2026-04-13 19:51:19","reason":"found in this entry's text"}],"entries_total":1,"docs":[],"docs_total":0,"gates":[],"related":[{"name":"CLAUDE_CODE_BASE_REF","slug":"claude-code-base-ref","description":"Git ref Claude Code diffs against when it attaches per-file diffs to Write and Edit tool results (in remote sessions with `CLAUDE_CODE_REMOTE` set, or bridge sessions with the `tengu_bridge_child_tool_diff` flag on, default `true`) and when it computes a branch-point diff of the repository. The base is `git merge-base HEAD <ref>`; unset, Claude Code uses the repository's default branch instead, and a value starting with `-` is ignored (the tool-result diff falls back to `HEAD`, the branch-point diff to uncommitted changes only). A matching entry in `CLAUDE_CODE_BASE_REFS` takes precedence, and Claude Code's bridge clears this variable from the environment of the sessions it spawns."}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/claude-code-base-refs","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}