Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cc",
"version": "1.2.0",
"version": "1.2.1",
"description": "Claude Code Plugin for Codex. Delegate code reviews, investigations, and tracked tasks to Claude Code from inside Codex.",
"author": {
"name": "Sendbird, Inc.",
Expand All @@ -18,6 +18,7 @@
"agent"
],
"skills": "./skills/",
"hooks": "./hooks/hooks.json",
"interface": {
"displayName": "Claude Code",
"shortDescription": "Claude Code Plugin for Codex",
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## v1.2.1

- Switch marketplace installs to Codex native plugin hooks: bundled hooks now load from `hooks/hooks.json` in the active plugin cache with `$PLUGIN_ROOT` instead of writing managed global hook commands into `~/.codex/hooks.json`.
- Remove the local checkout/stable-root install path from the supported install flow. The installer now uses `marketplace/add` + `plugin/install`, cleans stale `~/.codex/plugins/cc` state, and enables `[features].hooks` plus `[features].plugin_hooks`.
- Update public skills to resolve the active plugin root from their `SKILL.md` path, so marketplace cache installs run the matching companion code after plugin updates.
- Refresh README, setup, installer, and E2E coverage around the marketplace/cache-only install path, native hook feature-gate repair, and `$cc:setup` trust repair for this plugin's hook hashes.

## v1.2.0

- Default the Claude model for `review`, `adversarial-review`, and `rescue`/`task` to `opus` (resolved to the 1M-context variant `claude-opus-4-7[1m]`) with `xhigh` effort. The `sonnet` alias resolves to `claude-sonnet-4-6[1m]` and defaults to `high` effort; `haiku` stays on `claude-haiku-4-5` with effort unset. `--model` and `--effort` remain user-overridable; `xhigh` is now a first-class effort level and `max` is reserved for users who explicitly opt in.
Expand Down
79 changes: 26 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,36 +43,23 @@ It follows the shape of [openai/codex-plugin-cc](https://github.com/openai/codex

### 1. Install

Use one of these install paths, in this order:

1. **Sendbird marketplace (preferred)**
```bash
codex marketplace add sendbird/codex-marketplace
```
Then install `cc` from the Sendbird marketplace inside Codex, and run `$cc:setup` once. Marketplace/plugin install places the plugin, but this plugin still owns global hook setup and repair.

2. **`npx` installer**
```bash
npx cc-plugin-codex install
```
This is the cross-platform path we test on every release.

3. **Local checkout install**
```bash
git clone https://github.com/sendbird/cc-plugin-codex.git ~/.codex/plugins/cc
cd ~/.codex/plugins/cc
node scripts/local-plugin-install.mjs install --plugin-root ~/.codex/plugins/cc
```
After install, run `$cc:setup`.

The `npx` installer:
- Copies the plugin to `~/.codex/plugins/cc`
- Activates the plugin through Codex app-server when available
- Falls back to config-based activation on older Codex builds
- Enables `codex_hooks = true`
- Installs lifecycle, review-gate, and unread-result hooks

On Windows, prefer either the Sendbird marketplace path or the `npx` path. The shell-script installer below is POSIX-only.
Install from the Sendbird marketplace:

```bash
codex marketplace add sendbird/codex-marketplace
```

Then install `cc` from the Sendbird marketplace inside Codex, and run `$cc:setup` once.

`cc-plugin-codex` uses Codex native plugin hooks. The active plugin copy lives under Codex's plugin cache, and hook commands resolve through `$PLUGIN_ROOT`; there is no separate local checkout install.

The optional `npx` helper runs the same marketplace/cache install path and enables the required Codex feature gates:

```bash
npx cc-plugin-codex install
```

On Windows, prefer the Sendbird marketplace path or the `npx` helper. The shell-script helper below is POSIX-only.
Codex CLI's official guidance still treats Windows support as experimental and recommends a WSL workspace for the best Codex experience. Claude Code supports both native Windows and WSL.

> **Prerequisites:** Node.js 18+, Codex with hook support, and `claude` CLI installed and authenticated.
Expand Down Expand Up @@ -232,8 +219,8 @@ $cc:setup --enable-review-gate # turn on stop-time review gate
$cc:setup --disable-review-gate # turn it off
```

Setup checks Claude Code availability, hook installation, and review-gate state. If hooks are missing, it reinstalls them. If Claude Code isn't installed, it offers to install it.
This is also the repair path for marketplace-installed copies of the plugin: marketplace install can place the plugin, but `$cc:setup` is what confirms `codex_hooks = true` and installs the managed global hooks if they are missing.
Setup checks Claude Code availability, native plugin hook feature gates, and review-gate state. If Claude Code isn't installed, it offers to install it.
This is also the repair path for marketplace-installed copies of the plugin: `$cc:setup` confirms `[features].hooks = true` and `[features].plugin_hooks = true`, then trusts this plugin's current native hook hashes so Codex loads the bundled hooks from the active plugin cache.

## Background Jobs

Expand Down Expand Up @@ -296,7 +283,7 @@ The review gate is an **optional** stop-time hook. When enabled, pressing Ctrl+C
- **Tracked job ownership** — background jobs track unread/viewed state and session ownership, with safe PID-validated cleanup on session exit.
- **Built-in background notify** — rescue and review flows can now wake the parent thread and point directly to `$cc:result <job-id>` instead of relying only on later polling.
- **Unread-result nudges** — completed background jobs are still surfaced in your next prompt as a reliable fallback.
- **Idempotent installer** — manages plugin files, hooks, and config in a single atomic step. Safe to re-run for updates. Falls back gracefully on older Codex builds.
- **Idempotent installer** — installs through Codex's marketplace/cache path and enables native hook feature gates. Safe to re-run for updates.

## Install Variants

Expand All @@ -314,9 +301,9 @@ Then install `cc` from the Sendbird marketplace inside Codex, and run:
$cc:setup
```

Marketplace/plugin install places the plugin, but it does **not** install this plugin's managed global hooks for you. `$cc:setup` is the repair/install step that confirms `codex_hooks = true` and installs hooks when they are missing.
Marketplace/plugin install places the plugin under Codex's plugin cache. `$cc:setup` verifies Claude Code, confirms `[features].hooks = true` plus `[features].plugin_hooks = true`, and trusts the current `hooks/hooks.json` hook hashes from the active plugin cache.

### npx
### npx helper

```bash
npx cc-plugin-codex install
Expand All @@ -328,21 +315,7 @@ After install, run:
$cc:setup
```

### Local checkout

```bash
git clone https://github.com/sendbird/cc-plugin-codex.git ~/.codex/plugins/cc
cd ~/.codex/plugins/cc
node scripts/local-plugin-install.mjs install --plugin-root ~/.codex/plugins/cc
```

After install, run:

```text
$cc:setup
```

`local-plugin-install.mjs` expects `--plugin-root` to be the managed install directory itself. If you want to install from an arbitrary checkout path, use `npx cc-plugin-codex install` instead.
The helper adds the Sendbird marketplace, installs `cc` through Codex app-server, enables native hook feature gates, and removes stale global hook entries from older installs.

### Shell script (POSIX-only)

Expand All @@ -358,7 +331,7 @@ $cc:setup

### Update

Re-run the install command — it's idempotent.
Re-run the marketplace update/install flow or the `npx` helper — both are idempotent.

```bash
npx cc-plugin-codex update
Expand All @@ -379,10 +352,10 @@ claude auth login
```

**Commands not recognized in Codex**
Re-run install. If your Codex build doesn't support `plugin/install`, the installer falls back to config-based activation and generates skill wrapper files automatically. You'll see a warning in the install output.
Re-run install and restart Codex. This plugin expects Codex plugin support and no longer installs local skill-wrapper fallbacks.

**Hooks not firing**
Check that `codex_hooks = true` is set in `~/.codex/config.toml` under `[features]`. Run `$cc:setup` to verify and auto-repair.
Check that `hooks = true` and `plugin_hooks = true` are set in `~/.codex/config.toml` under `[features]`. Run `$cc:setup` to verify and auto-repair the feature gates plus this plugin's hook trust hashes, then restart Codex if those flags were just changed.

**A background job finished but I did not get the result nudge**
Use:
Expand Down
4 changes: 2 additions & 2 deletions internal-skills/cli-runtime/runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

Use this document only inside the rescue forwarding worker spawned by `$cc:rescue` as defined in `../../skills/rescue/SKILL.md`.
This is an internal execution contract, not a public skill. It owns execution and routing. It does not own prompt rewriting beyond deciding when to consult the prompt-shaping reference.
The public rescue skill already resolved the installed plugin root. Reuse that installed copy path here. Do not derive a new runtime path from this document, any cache directory, or the current working tree.
The public rescue skill already resolved the active plugin root from its `SKILL.md` path. Reuse that path here. Do not derive a new runtime path from this document or the current working tree.

Primary helper:
- `node "<installed-plugin-root>/scripts/claude-companion.mjs" task ...`
- `node "<plugin-root>/scripts/claude-companion.mjs" task ...`

Execution rules:
- The rescue subagent is a forwarder, not an operator. Launch exactly one `task` command and return that stdout unchanged.
Expand Down
8 changes: 4 additions & 4 deletions internal-skills/review-runtime/runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

Use this document only when the main Codex thread or a built-in forwarding child is executing a Claude Code `review` or `adversarial-review` command.
This is an internal runtime reference, not a public skill. It captures the exact companion-command contract and the foreground/background execution boundary.
The public skill already resolved the installed plugin root. Reuse that installed copy path here. Do not derive a new runtime path from this document, any cache directory, or the current working tree.
The public skill already resolved the active plugin root from its `SKILL.md` path. Reuse that path here. Do not derive a new runtime path from this document or the current working tree.

Primary helper:
- `node "<installed-plugin-root>/scripts/claude-companion.mjs" review ...`
- `node "<installed-plugin-root>/scripts/claude-companion.mjs" adversarial-review ...`
- `node "<plugin-root>/scripts/claude-companion.mjs" review ...`
- `node "<plugin-root>/scripts/claude-companion.mjs" adversarial-review ...`

Execution boundary:
- Foreground review stays on the main Codex thread. Do not satisfy foreground review through a review subagent, a generic review-runner role, or any background worker abstraction.
- Background review uses exactly one built-in forwarding child through `spawn_agent`.
- Never satisfy either mode with raw `claude`, `claude-code`, `claude review`, hand-rolled `bash -lc ...claude...`, or detached companion shell backgrounding.
- If the installed companion command fails, surface that failure instead of improvising a different executor.
- If the resolved companion command fails, surface that failure instead of improvising a different executor.

Foreground contract:
- Strip `--wait` and `--background` before building the companion command.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cc-plugin-codex",
"version": "1.2.0",
"version": "1.2.1",
"description": "Claude Code Plugin for Codex by Sendbird",
"type": "module",
"author": {
Expand Down
Loading
Loading