# Oh My Diff: change how Codex CLI works with TypeScript mods

Published 2026-11-02. URL: https://ohmydiff.me/blog/introducing-oh-my-diff

Most of what I wanted to change about Codex CLI was in the terminal. Long tool runs pushed the plan off screen, and
shell calls printed dozens of lines I scrolled past. I wanted my rate limits and git branch beside the prompt. Codex
`0.166.0` has skills, plugins and hooks. A hook can block or rewrite a tool call, but it
[can't hold state or draw on screen](https://github.com/dzkchen/oh-my-diff/blob/main/docs/how-omd-works.md#mods-plugins-skills-and-hooks).
Changing the terminal meant editing Codex's Rust code and maintaining a fork.

Oh My Diff (OMD) is [Codex CLI](https://github.com/openai/codex) with one patch that adds a host for TypeScript mods.
I keep the patch current so that your change can be a mod instead of a fork. You still run `codex` with your settings,
sign-in and sessions in `~/.codex`, and can go back to plain Codex with nothing to migrate. Every feature OMD adds is a TypeScript mod; the host provides the APIs those mods use.
OMD is in beta and runs only on Apple Silicon Macs. This post describes OMD `1.4.0`, on Codex `0.166.0`.

> **Update, 2026-11-04 (OMD `1.4.2`):** OMD+ now installs only the mods that have been fully tested.
> `omd_plan_panel`, `omd_lsp_sync` and `omd_idle_compact` are experimental: install one with `omd install ID`, then
> `omd mods enable ID`. The [changelog](/changelog) has the details.
>
> **Update, 2026-11-08 (OMD `1.5.0`):** OMD now runs on Codex `0.167.x`, so the install below needs Codex `0.167.x`.
> Mod choices in `/mods` can apply to one terminal only. The [changelog](/changelog) has the details.

## A failing test, with the plan and tool output in view

A task I give Codex often is "this test fails, find the regression and fix it." In OMD+, the full install, three
mods change how that session looks: two that are on by default and one you turn on.

`omd_plan_panel`, off until you turn it on in `/mods`, pins Codex's own plan above the prompt, so you can see it while
tools run:

```text
● Plan (2/5)
├─ ✓ Read the failing test
├─ ✓ Find the regression
├─ ◐ Fix the parser
├─ ○ Run the suite
└─ ○ Summarize
```

`omd_tool_lines` shows each tool call as one line with its result. A click or `F4` opens the full output:

```text
• Shell cargo test -p codex-omd · ok · 214 lines · 41.3s
• Edit tui/src/transcript_view/layout.rs · +9 −3
✗ Shell pnpm lint · exit 1 · 18 lines · 2.4s
```

Both blocks are README examples. `omd_statusline` puts model, context, limits, cost and git state next to the prompt,
and `/statusline` edits it.

Another opt-in mod changes what the agent sees:

```sh
omd-package mod enable omd_lsp_sync
```

With a language server such as `rust-analyzer` on your `PATH`, each tool call that writes files returns the errors that
edit introduced and the ones it fixed, up to 8 of each per file
([supported servers and limits](https://github.com/dzkchen/oh-my-diff/blob/main/mods/first-party/omd_lsp_sync/README.md)).

The plan panel reimplements juicesharp's
[`rpiv-todo`](https://github.com/juicesharp/rpiv-mono/tree/main/packages/rpiv-todo), and `omd_lsp_sync` is based on
Apostolos Mantzaris's [pi-lens](https://pi.dev/packages/pi-lens).

## Install

You need Codex `0.166.x` and Python 3.12 or newer. This installs OMD+:

```sh
curl --proto '=https' --tlsv1.2 -fsSL https://github.com/dzkchen/oh-my-diff/releases/latest/download/install.sh | sh -s -- --profile full
```

The installer checks the release signature and checksum. For the host alone, use `--profile platform` to get OMD Core:
`/mods`, update notices and the OMD mark, with Codex otherwise unchanged. The
[install guide](https://github.com/dzkchen/oh-my-diff/blob/main/docs/install.md) covers updating, switching and
removing it.

## Writing your own mod

A mod can add a command or a model tool, add context to a request, draw a panel or react to tool calls. This scaffolds
one with a `/hello` command and tests it offline, with no model call:

```sh
omd-mod-author create ./my_mod my_mod
cd my_mod
pnpm test
```

Writing a mod needs Node 24.18 or a later 24.x, and a few included mods use Node
([versions](https://github.com/dzkchen/oh-my-diff/blob/main/docs/support.md#versions)).

## Forks, plugins and plain Codex

Your own fork can change any line of Codex, and you rebase it for every upstream release. OMD's pin went through nine
Codex versions in 32 days, from `0.159.1` on 2026-09-29 to `0.166.0` on 2026-10-31, and in OMD `1.4.0` the patch
edits 481 upstream files. I do those rebases so mod authors don't. Mods can only use the
[mod API](https://github.com/dzkchen/oh-my-diff/blob/main/mods/reference/README.md). A change outside it still needs a
fork, or a [mod API request](https://github.com/dzkchen/oh-my-diff/issues/new?template=mod-api.yml).

Skills, plugins, MCP servers and hooks need no rebuild. A skill fits a procedure, a plugin or MCP server fits tools, and
a hook fits a reaction to an event. A wrapper script can only set flags and environment before `codex` starts.

Plain Codex is the right choice if its defaults suit you, and it updates as soon as a release ships. In OMD you keep
Codex on one version line, `0.166.x` in OMD `1.4.0`, until `omd update` supports the next.

Plain Codex also uses less memory, because every active mod package runs in its own process. On one Apple M5 Mac with
a scripted model, release builds of OMD+ on Codex `0.165` and `0.166` used about 100 MB as installed, with each
`omd-runner` at 7 to 10 MB (macOS memory footprint 10 s after start, October 2026). Codex alone and OMD+ were both
ready to type in about 0.3 s. An earlier OMD+ build on Codex `0.164.0` was ready to type in 39.3 ms in Kitty and
44.3 ms in Orca, against 43.7 and 46.1 ms for stock Codex (p50 of 10 interleaved launches on an M5 Mac,
2026-10-27/28, ±2 ms between runs).

## Defaults and permissions

Installing a mod doesn't turn it on, and turning one on shows its permissions and asks first. Mods run in
[sandboxed processes](https://github.com/dzkchen/oh-my-diff/blob/main/docs/how-omd-works.md#mods-run-in-their-own-processes),
and `omd mods disable ID` works from any shell, even when `codex` won't start. Mod API `1.0.0` is stable, and
[surfaces marked experimental](https://github.com/dzkchen/oh-my-diff/blob/main/mods/reference/stability-and-migration.md#experimental-entries-in-the-registry)
can change. OMD isn't affiliated with OpenAI.

Two default-on OMD+ mods change behavior. `omd_idle_compact`
compacts an idle conversation of 100,000 tokens or more near the estimated prompt-cache deadline. By default it skips
OpenAI subscription sessions. Compaction loses detail and cancels a pending approval or question. `omd_auto_continue`
declines an approval that nobody answers within two minutes and tells the agent to continue past an unanswered question.
It never approves anything. Turn either off in `/mods`, or start from OMD Core.

## Install OMD+ and open `/mods`

[Install OMD+](/docs/get-started), then open `/mods` in `codex` to review the included mods and turn on the ones you want.

The [list of included mods](https://github.com/dzkchen/oh-my-diff/blob/main/docs/collection.md) says what each one
does. The [mod tutorial](https://github.com/dzkchen/oh-my-diff/blob/main/docs/mod-authors/first-mod.md) builds `/hello`
and installs it. The rest is on [ohmydiff.me](https://www.ohmydiff.me).
