> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gloo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrate from Codex CLI

> Bring your AGENTS.md, skills, and config.toml MCP servers from OpenAI Codex CLI into Gloo Code.

Codex CLI users already write instructions in `AGENTS.md`, and Gloo Code reads that file as it is. The main task is moving your MCP servers from `config.toml` into Gloo Code's JSON format.

## What carries over automatically

| You have | What Gloo Code does |
| - | - |
| `AGENTS.md` in your project | Loads it, from the current folder up to the repository root, nearest first |
| `AGENTS.md` in a subfolder | Attached when the agent reads a file in that folder |
| Skills in `~/.agents/skills` or `.agents/skills` | Discovered automatically (project skills after you trust the folder) |

## Do once

**1. Install and sign in**

Follow [Installation & Setup](/gloocode/installation). Sign-in happens in your browser, and your organization needs a Gloo Code subscription with a seat for you.

**2. Open your project**

Run `gloocode` in your project folder and trust the folder if Gloo Code asks (it asks once, when the folder has its own config). Your `AGENTS.md` is already in use.

**3. Copy your personal instructions**

If you keep personal instructions in `~/.codex/AGENTS.md`, copy them to Gloo Code's global location.

```bash theme={null}
mkdir -p ~/.config/gloocode
cp ~/.codex/AGENTS.md ~/.config/gloocode/AGENTS.md
```

**4. Convert your MCP servers**

Move each `[mcp_servers.<name>]` table into the `mcp` section of `gloocode.json`. See the example below, or the full recipe on [Move your MCP servers](/gloocode/migrate/mcp-servers#from-codex).

## Convert config.toml to gloocode.json

Gloo Code keeps its settings in `gloocode.json` (comments are allowed), either globally in `~/.config/gloocode/gloocode.json` or per project at the project root. MCP servers live under the `mcp` key.

```toml ~/.codex/config.toml theme={null}
[mcp_servers.docs]
command = "npx"
args = ["-y", "some-mcp"]
env = { TOKEN = "x" }
startup_timeout_sec = 20
```

```json gloocode.json theme={null}
{
  "mcp": {
    "docs": {
      "type": "local",
      "command": ["npx", "-y", "some-mcp"],
      "environment": { "TOKEN": "{env:TOKEN}" },
      "timeout": 20000
    }
  }
}
```

What changed in the move:

* `command` and `args` become one `command` array.
* `env` becomes `environment`. Setting `TOKEN` in your shell and writing `{env:TOKEN}` keeps the secret out of the file.
* `startup_timeout_sec` (seconds) becomes `timeout` (milliseconds). Multiply by 1000: `20` becomes `20000`. `timeout` also limits each tool call, so raise it if your tools run long.

For a server that uses a bearer token from an environment variable, send it as a header.

```toml ~/.codex/config.toml theme={null}
[mcp_servers.api]
url = "https://api.example.com/mcp"
bearer_token_env_var = "API_TOKEN"
```

```json gloocode.json theme={null}
{
  "mcp": {
    "api": {
      "type": "remote",
      "url": "https://api.example.com/mcp",
      "headers": { "Authorization": "Bearer {env:API_TOKEN}" }
    }
  }
}
```

Servers that sign in with OAuth can be authorized with `gloocode mcp auth <name>`.

## Day to day

| In Codex CLI | In Gloo Code |
| - | - |
| `AGENTS.md` | `AGENTS.md`, unchanged |
| `~/.codex/config.toml` | `gloocode.json` |
| `codex exec "task"` | `gloocode run "task"`. Add `--format json` for a stream of JSON events, one per line. Piped stdin is added to your message |
| `codex resume` | `gloocode --continue`, `gloocode --session <id>`, or `/sessions` |
| `--yolo` | `--unleashed` allows every prompt that no deny rule blocks, for that run. See the warning below |
| Choose a model | Gloo Code picks the model for you. To choose, use `/models`, or start with `-m` or `--model gloo/<key>`. `gloocode models --verbose` lists what's available |
| Plan before you build | **Tab** switches to the **plan** agent, which reads and proposes without editing. Switch back to **build** to carry it out |
| Undo changes | `/undo` and `/redo` |
| Mention a file | Type `@` and pick the file |

> [!WARNING]
>
> `--unleashed` lets the agent change or delete files and run commands without asking. Use it only in a scratch folder, a container, or a throwaway checkout. You are responsible for what it runs.

> [!TIP]
>
> Want to pass extra convention files to the agent? Add them under `instructions` in `gloocode.json`, for example `{ "instructions": ["./docs/conventions.md"] }`.

## Next steps

> **[Move your MCP servers](/gloocode/migrate/mcp-servers)**
>
> More conversion examples, including remote servers.

> **[Migration checklist](/gloocode/migrate/checklist)**
>
> A copy-and-paste checklist for your first day.

> **[Launch Gloo Code](/gloocode/launch)**
>
> Start the terminal UI and run your first task.

> **[Billing & Plans](/studio/billing#choosing-a-gloo-code-tier)**
>
> Tiers, seats, and your monthly allowance.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.