The control plane is not governed. Its own pull requests use the checks at their own base branch.
Nothing from the control plane is written into a governed repository’s working tree or committed there.
The default control plane
A factory with several linked repositories always has a control plane. Unless you set one, it is the first-linked repository: the one whose link to the factory is oldest. OuterLayer reads it at its default branch. A repository that is unlinked and linked again counts from its new link. On Settings → Repositories, the row of this repository has a Default control plane badge. When you unlink the default control plane, the next first-linked repository becomes the default.Set the control plane
You need the Set the control plane permission. Organization owners and admins hold it. Without it, the Use as control plane button does not show.- Link the repository to the factory, as you would any repository.
- Open the factory’s Settings → Repositories.
- On the repository’s row, choose Use as control plane.
- Type the repository’s name to confirm.
- A repository the factory does not link.
- A branch it cannot read.
- A
.outerlayer/config.jsonthat is not valid JSON. - A repository that is already the control plane of another factory.
Stop using a control plane
To remove a control plane you set, choose Stop using as control plane on its row, and type the repository’s name to confirm. This takes the Remove the control plane permission. The factory then uses its first-linked repository as the control plane. Unlinking a control plane you set has the same result. Renaming the repository on GitHub does not remove it.What a control plane holds
One file is not shared. A
CLAUDE.md in the control plane is not used. Keep shared instructions in AGENTS.md.
The run of a schedule automation gets the shared MCP servers too, and nothing else from the control plane. A code review and a judge get none. Only Claude Code gets the shared MCP servers. A build that runs Codex or OpenCode gets none from the control plane.
Share MCP servers
Put a server in the control plane’s.mcp.json. Every governed repository then has it, in builds and in outerlayer claude sessions. One pull request to the control plane adds a server to all of them.
.mcp.json beside the shared one. The session has the servers of both files.
A repository cannot replace a shared server. If its .mcp.json names a server with the same name and a different entry, outerlayer claude does not start a session. A build ends before its agent starts. The message names the server. Rename or remove the repository’s server. A repository that names the same server with the same entry is not refused. The session has that server once.
Claude Code also reads a .mcp.json in the folder where you start the session and in each folder above it. The check covers all of them, not only the file at the repository root. The message names the file that holds the entry. A file above the repository that is not valid JSON, or that nests too deeply, is skipped and does not stop the session.
If you turn a server off for the project with disabledMcpjsonServers, the session still has the shared copy of that server.
outerlayer claude also refuses to start a session, and a build ends before its agent starts, when the control plane’s .mcp.json is not a JSON object. The same holds for a file that nests more than 64 levels deep. The message names the file and says what is wrong.
A server can name a variable, such as ${LOGS_TOKEN}, for a token. When the variable is not set, the session starts without that server. A line before it names the server and the variable. The other servers stay. In a build, the line is in the build’s log.
A runner that limits the hosts of its builds refuses the host of a shared server unless its owner agrees once. See Allow the hosts of shared MCP servers.
A CLI or runner older than 0.47.0 ignores the control plane’s .mcp.json and says nothing. Update both to 0.47.0 or later. A repository’s own outerlayer server, from outerlayer init, has a name. A shared server with that name and another entry makes the repository’s file conflict.
What a governed repository commits
A governed repository keeps its own instructions beside the shared ones. It commits its ownCLAUDE.md, AGENTS.md and skills, and Claude Code reads them together with the control plane’s.
A repository cannot replace a shared skill. If it commits a skill with the same name as a shared skill, outerlayer claude refuses to start, and names the skill’s folder. Rename or remove the repository’s skill.
What a laptop session does in a governed repository
Start the session withouterlayer claude in place of claude. It takes the same arguments:
outerlayer claude asks OuterLayer which control plane governs the repository, and at which commit. It fetches that commit from your git host with your own git credentials, and keeps the copy under ~/.outerlayer/context/. It then starts Claude Code with the copy added. The agent and every subagent follow the shared instructions, skills, subagents and hooks.
The session reads the same commit that the pull request’s judges later use.
To make plain claude do the same, run outerlayer init --shell-function. It adds a claude function to your zsh or bash startup file. outerlayer init --no-shell-function removes it.
When the control plane is not attached
outerlayer claude starts Claude Code without a control plane in these cases:
- You are outside a git repository.
- You are not signed in. Run
outerlayer login. - The repository has no
originremote. - No control plane governs the repository.
outerlayer claude uses the last copy it stored and says that the copy can be out of date. If the repository is governed and no copy is stored, it stops and says why. Run it again when you are online.
These sessions do not get the control plane, because they do not start through outerlayer claude:
- The Claude desktop app and IDE extensions.
- Cloud sessions.
- A script that runs
claude. Change the script to runouterlayer claudewith the same arguments.
What a build does in a governed repository
A container or microVM build of a governed repository gets the control plane the same way. The runner puts it in a directory outside the checkout, so the build cannot commit it. A command in your runner config, such asclaude -p "Build the issue", needs no change. See A governed repository’s context.
To see what a build receives, run outerlayer context show.
Hooks in a control plane
The control plane’s.claude/ folder is not in the governed checkout. A hook in the control plane must name its scripts through OUTERLAYER_CONTROL_PLANE_DIR:
$CLAUDE_PROJECT_DIR/.claude, "$CLAUDE_PROJECT_DIR"/.claude and ${CLAUDE_PROJECT_DIR}/.claude. Run outerlayer doctor in the control plane. It names each hook that reaches .claude/ another way.
Keep skills in .agents/skills/
A control plane can keep its skills in .agents/skills/. Codex and other tools that follow the SKILL.md standard read that folder, and Claude Code still gets each skill under its own name. When both folders hold a skill of the same name, the .claude/skills/ copy wins.
Follow two rules for paths:
- In a skill, name the skill’s own files relative to its folder, or with
${CLAUDE_SKILL_DIR}. OuterLayer does not rewrite a path under.agents/in a skill. - In the control plane’s
AGENTS.md, a path under.agents/names the copy that OuterLayer delivers.
outerlayer- skills that the CLI keeps in ~/.agents/skills/ on each machine. The copy that OuterLayer delivers holds none of them, even when the control plane commits one. In the Markdown files of the control plane’s skills and in its AGENTS.md, OuterLayer changes each path to a maintained skill to its path in ~/.agents/skills/. For example, ../outerlayer-build/SKILL.md becomes ~/.agents/skills/outerlayer-build/SKILL.md.
A control plane declares "layout": 2 in .outerlayer/config.json when it uses the layout in Set up agent instructions and skills. outerlayer claude and builds refuse a layout value other than 1 or 2. A build then ends with context_layout_unsupported. See Troubleshoot builds.
Manage it through the API
A script can read, set and remove the control plane at/v1/orgs/{orgName}/apps/{appId}/context-source. {appId} is the factory’s id. The API calls the control plane context-source.
PUT takes a JSON body with repository as owner/repo, and ref, which defaults to main:
A management API key works on an Enterprise plan. A factory’s own API key does not. See Organization API for keys and permissions. The API reference lists the operations under Context.