---
slug: "pi-codex-profile"
source_type: "readme"
source_url: "https://cdn.jsdelivr.net/gh/Graffioh/pi-codex-profile@main/README.md"
repo: "https://github.com/Graffioh/pi-codex-profile"
source_file: "README.md"
branch: "main"
---
# pi-codex-profile

Codex performance profile for [pi coding agent](https://github.com/badlogic/pi-mono/).

No command needed: once the extension is loaded (`/reload`), it works automatically when your active model is Codex.

## What it improves

### 1) Codex operating profile (auto-injected)
When a Codex model is active, the extension appends a comprehensive Codex profile to the system prompt.

It includes high-impact coding guidance adapted from the Codex Prompting Guide and updated for newer Codex behavior:
- tool-first behavior (prefer dedicated tools, `rg` for search)
- autonomy and persistence (ship end-to-end, avoid plan-only, phase medium/large tasks)
- cleaner editing workflow (batch edits, preserve user changes)
- safer behavior (avoid destructive actions unless explicitly requested)
- evidence-based verification and concise final responses

UI status shows when active: `Codex profile`.

### 2) `apply_patch` tool
Adds a Codex-style `apply_patch` tool to handle patches like:
- `*** Add File:`
- `*** Update File:` (with optional `*** Move to:`)
- `*** Delete File:`

The parser/patching flow is aligned with the OpenAI cookbook `apply_patch` format and behavior.

## Install

```bash
pi install npm:pi-codex-profile
```

## Example patch

```text
*** Begin Patch
*** Update File: src/example.ts
@@
-old line
+new line
*** End Patch
```

## Notes

- Works only when the current model is recognized as Codex.
- Paths are restricted to the current working directory (no absolute paths).
- The injected profile remains coding-focused (debugging, refactors, migrations, tests, CI).

## License

MIT
