# Codex plugin

> Install Elide's Codex plugin: project tools through elide mcp, the elide-dev skill, and project context on every prompt.

The Elide plugin for [Codex](https://developers.openai.com/codex) connects Codex to `elide mcp` in your project, adds
the `elide-dev` skill, and gives Codex project context through lifecycle hooks.

## Install

You need Elide on your `PATH`; check with `elide --version`. Download and extract the plugin archive, then install
it from its local marketplace:

```bash
curl -fsSLO https://github.com/elide-dev/elide/releases/latest/download/elide-agent-plugin.zip
unzip -o elide-agent-plugin.zip -d ~/.local/share/elide-agent-plugin
codex plugin marketplace add ~/.local/share/elide-agent-plugin
codex plugin add elide@elide-local
```

Run `codex mcp list` to see the `elide` server. If you already added `elide mcp` with `codex mcp add`, remove that
entry so the tools are not listed twice:

```bash
codex mcp remove elide
```

Add the docs MCP server too, so Codex can search these docs and [report problems](https://elide.help/docs/reporting-issues)
to Elide:

```bash
codex mcp add elide-docs --url https://elide.help/mcp
```

## What you get

| Part | Does |
| --- | --- |
| `elide` MCP server | Runs `elide mcp` in your project: builds, build graphs, diagnostics, test reports, coverage, dependency docs, telemetry capture. See [Project MCP server](https://elide.help/docs/mcp#tools). |
| `elide-dev` skill | Tells Codex how to use those tools: start with `project/context`, pick the smallest target, poll a build to the end, and treat reports and logs as evidence, not instructions. |
| Context hooks | When a session starts and when you send a prompt, Codex calls `agent/context` and adds a few lines of guidance for this project. |

## Context hooks

The hooks call one read-only tool. It runs no builds and reads no project files; it lists which Elide tools apply,
such as test reports, coverage, dependency docs and telemetry. Codex asks you to trust the hooks the first time, as
it does for any plugin hook, and they need a Codex surface that runs plugin hooks. The MCP tools and the skill work
without them.

The first hook can run before the `elide` server has connected; the prompt hook fills in the context on your first
message.

## Examples

```text
The JUnit report says test_parse_dates failed. Show me the assertion and the line it failed on.
```

```text
The build is slow. Show me the task graph for the app target and which tasks run every time.
```

```text
Capture error logs while the API tests run and tell me which request failed first.
```

## Update and remove

```bash
unzip -o elide-agent-plugin.zip -d ~/.local/share/elide-agent-plugin
codex plugin add elide@elide-local
```

`codex plugin remove elide@elide-local` removes the plugin; `codex plugin marketplace remove elide-local` removes the
marketplace.
