# Use Codex with multiple repositories
> Codex works in one project at a time; ivar adds one feature branch, one plan and one pull request per repo across several.
Source: https://ivar.run/docs/with/codex

Codex reads its config and skills from one project root. `ivar` adds what that leaves open across several repos: a feature branch, a write scope that is guarded (kernel-enforced on Linux; see [Limitations](/docs/reference/limitations)) on the repos you have not promoted, one plan, and one pull request per repo.

## Install and create a hall

Install the binary yourself, then open Codex in an empty git directory and ask for the hall:

```sh
curl -fsSL https://ivar.run/install | sh
mkdir my-hall && cd my-hall && git init
codex
```

```text
  > Set this directory up as an ivar hall for Codex and add our api, web, shared-types and infra repos from github.com/acme.
  ● Bash(ivar init --provider codex)
  ● Bash(ivar repo add api git@github.com:acme/api.git)
  ● Added `api`; adding `web`, `shared-types` and `infra` the same way.
```

**Run it by hand:**

```sh
ivar init --provider codex
ivar repo add <name> <url>   # repeat for every repo the hall owns
```

In an existing hall, `ivar provider add codex` registers the provider.



Codex runs the hall's guard only once it trusts the hall and the guard hook. Run `codex` in the hall once and trust the folder; see [the Codex provider](/docs/providers/codex). The [quickstart](/docs/quickstart) walks through the rest.

## One change across repos

The example hall has `api`, `web`, `shared-types` and `infra`. The request: add an `avatarUrl` field to the user profile, return it from the API and render it on the web profile page.

```text
  > Start a feature called avatar-url that changes api, web and shared-types.
  ● Bash(ivar feature create avatar-url)
  ● Bash(ivar feature promote avatar-url api)
  ● Bash(ivar feature promote avatar-url web)
  ● Bash(ivar feature promote avatar-url shared-types)
  ● Bash(ivar session connect --feature avatar-url --create --json)
```

Ask for the plan and approve each gate. Once it is built, ask what delivery would push:

```text
  > Show me what delivery would push.
  ● Bash(ivar feature deliver avatar-url --preview)
  ● Three pull requests: `api`, `web` and `shared-types`. Nothing is pushed yet.
```

**Run it by hand:**

```sh
ivar feature create avatar-url
ivar feature promote avatar-url api
ivar feature promote avatar-url web
ivar feature promote avatar-url shared-types
ivar session start avatar-url --provider codex
```

Inside the session, ask Codex to plan and approve each gate. Then, from the hall:

```sh
ivar feature deliver avatar-url --preview
```



The preview lists three pull requests: `api`, `web` and `shared-types`. `infra` stays guarded and gets none.

## What lands in the session

A Codex hall gets `AGENTS.md`, the hall's skills in `.agents/skills`, and a `.codex/` with `config.toml` and `hooks.json`. The write guard and the memory hooks are entries in `hooks.json`, and `config.toml` carries the `<hall>-ivar` MCP server (see [Hall memory](/docs/guide/memory)). See [the Codex provider](/docs/providers/codex).

## MCP servers

Declare each server once in `ivar.json`. `ivar sync` writes the `[mcp_servers.<hall>-<name>]` tables of `.codex/config.toml`, and `ivar mcp auth` logs in through `codex mcp login`. See [MCP for Codex](/docs/guide/mcp/providers/codex).

## Limits

- `ivar` runs on Linux and macOS. Windows is not supported.
- Codex has no project-level slash commands, so `ivar` writes no `/ivar-*` commands for it; the workflows reach it as skills.
- Codex starts without the guard when it does not trust the hall or the guard hook. `ivar session start` refuses to launch until it does.
- On Linux, a write to an unpromoted repo fails with `EACCES` from the kernel. On macOS only the worktree root loses its write bit. See [Limitations](/docs/reference/limitations).

## FAQ

### Does Codex create one branch across several repos?

No. `ivar feature create` names the branch once, and `ivar feature promote` puts a worktree on it in each repo you name.

### Can I move this feature to another harness?

Yes. `ivar session relay avatar-url --provider claude-code` opens the same feature in Claude Code.
