Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
2bf6daf
feat(mcp): add safe capability discovery
CBEPX Aug 31, 2026
f9f1310
fix(mcp): harden capability secret handling
CBEPX Aug 31, 2026
4392b1a
feat(workflows): add durable peer workflow state
CBEPX Aug 31, 2026
60d96ec
fix(workflows): harden state transitions and manifests
CBEPX Aug 31, 2026
e1e7eda
feat(peer): add design and research orchestration
CBEPX Aug 31, 2026
0a72b58
fix(peer): seal orchestration trust boundaries
CBEPX Aug 31, 2026
cae57f3
feat(peer): unify workflow user surfaces
CBEPX Aug 31, 2026
115798c
fix(peer): close workflow surface races
CBEPX Aug 31, 2026
8642884
fix(peer): harden workflow isolation and cancellation
CBEPX Sep 1, 2026
8e80df5
fix(peer): enforce ephemeral fail-closed isolation
CBEPX Sep 1, 2026
25f86f7
fix(peer): reserve attempts before worker dispatch
CBEPX Sep 1, 2026
183a6e9
fix(peer): reject active lease reflection
CBEPX Sep 1, 2026
b659cfd
fix(peer): bound wait and retry recovery
CBEPX Sep 1, 2026
baef294
fix(peer): fail closed on linked cancellation
CBEPX Sep 1, 2026
7306000
test(peer): complete runtime hardening acceptance
CBEPX Sep 1, 2026
cd837a7
test(peer): prove late TERM result rejection
CBEPX Sep 1, 2026
7654ff0
test(peer): prove late TERM result delivery
CBEPX Sep 1, 2026
d7ce4d6
fix(peer): close final workflow hardening gaps
CBEPX Sep 1, 2026
772b7b0
test(peer): await late TERM delivery
CBEPX Sep 1, 2026
fe2231a
test(sandbox): pin supported settings platform
CBEPX Sep 1, 2026
74e8561
test(sandbox): normalize canonical path assertions
CBEPX Sep 1, 2026
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
8 changes: 5 additions & 3 deletions .codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cc",
"version": "1.6.1",
"description": "Claude Code Plugin for Codex. Delegate code reviews, investigations, tracked tasks, and transcript transfers from inside Codex.",
"version": "1.7.0",
"description": "Claude Code Plugin for Codex. Run reviews, tracked tasks, and independent Codex-Claude design or research workflows.",
"author": {
"name": "CBEPX",
"url": "https://github.com/CBEPX"
Expand All @@ -21,7 +21,7 @@
"interface": {
"displayName": "Claude Code",
"shortDescription": "Claude Code Plugin for Codex",
"longDescription": "Use Claude Code from inside Codex to run read-only reviews, adversarial design reviews, tracked rescue tasks, and transcript transfers through a Claude-backed runtime with job status and result retrieval.",
"longDescription": "Use Claude Code from inside Codex for read-only reviews, tracked rescue tasks, transcript transfers, and independent Codex-Claude design or research workflows with aggregate status, result, and cancellation.",
"developerName": "CBEPX",
"category": "Coding",
"capabilities": [
Expand All @@ -33,6 +33,8 @@
"Use Claude Code to review my current changes through $cc:review",
"Use Claude Code to challenge this implementation through $cc:adversarial-review",
"Use Claude Code to investigate and fix this issue through $cc:rescue",
"Compare this technical decision with independent Codex and Claude evidence through $cc:design",
"Research this repository question with independent Codex and Claude evidence through $cc:research",
"Transfer this Claude Code session into Codex through $cc:transfer"
],
"brandColor": "#7B39FE",
Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@

## [Unreleased]

## v1.7.0

### Added

- Add `$cc:design` and `$cc:research` durable peer workflows with independent Codex and Claude evidence, frozen checkpoints, explicit cross-session continuation, and failed-only retry.
- Discover read-only Claude MCP capabilities, freeze only selected public tool metadata/reasons, and launch Claude with a strict selected-server config and no Bash, write, or Agent tools.
- Add deterministic acceptance coverage for dual-branch checkpointing, Claude-first content isolation, sandbox failure, TERM races, evidence failure and retry, SessionEnd, aggregate cancellation, continuation, model fallback/tool telemetry, and zero workspace changes.

### Changed

- Resolve `$cc:status [id]`, `$cc:result [id]`, and `$cc:cancel [id]` across jobs and peer workflows. Default status shows one workflow aggregate and hides linked jobs; `--all` includes them.
- Render peer phase, independent branch/evidence state, requested/final models and fallbacks, selected secret-free tool reasons, checkpoint/final result, and exact next command.
- Emit unread-result notices once per aggregate workflow checkpoint, incomplete state, or final completion while suppressing workflow-linked job notices.
- Run initial and critique Claude turns as fresh non-persistent sessions inside the required fail-closed filesystem sandbox, with content-free progress until the trusted reveal transition.
- Transport single-use attempt leases only through stdin, persist digests instead of raw leases, and reserve work before dispatch without changing the public `$cc:design` or `$cc:research` syntax.

### Fixed

- Preserve aggregate `cancel_failed` whenever a linked process cannot be identity-verified instead of reporting successful workflow cancellation.
- Bound Claude-first sibling waiting to one absolute 30-minute deadline, reconcile retries against the current linked job, invalidate stale epochs and lost workers, preserve completed bytes, and keep `cancel_failed` terminal.

## v1.6.1

### Added
Expand Down
72 changes: 50 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<p align="center">
<a href="#quick-start"><strong>Quick Start</strong></a> ·
<a href="#commands"><strong>Commands</strong></a> ·
<a href="#peer-design-and-research"><strong>Peer Workflows</strong></a> ·
<a href="#background-jobs"><strong>Background Jobs</strong></a> ·
<a href="#review-gate"><strong>Review Gate</strong></a> ·
<a href="#how-this-differs-from-upstream"><strong>vs Upstream</strong></a> ·
Expand All @@ -28,11 +29,12 @@
`cc-plugin-codex` turns Codex into a host for Claude Code work.
**Codex stays in charge of the thread. Claude Code does the review and rescue work.**

You get nine commands (`$cc:review`, `$cc:adversarial-review`, `$cc:rescue`, `$cc:transfer`, `$cc:status`, `$cc:result`, `$cc:cancel`, `$cc:mcp-diagnose`, `$cc:setup`) that launch tracked Claude Code work, transfer Claude transcripts into Codex, manage lifecycle and ownership, and surface results back into Codex.
You get eleven commands, including `$cc:design` and `$cc:research`, that launch tracked Claude Code work, compare independent Codex and Claude evidence, transfer transcripts, manage lifecycle and ownership, and surface results back into Codex.

That includes:
- Built-in Codex subagent orchestration for rescue and background review flows
- Session-scoped tracked jobs with status, result, and cancel commands
- Durable peer design/research workflows with independent evidence, failed-only retry, and cross-session continuation
- Background completion nudges that steer you to the right `$cc:result <job-id>`
- An optional stop-time review gate
- GitHub CI coverage on Windows, macOS, and Linux
Expand All @@ -46,7 +48,7 @@ It follows the shape of [openai/codex-plugin-cc](https://github.com/openai/codex
Install the fork release from the CBEPX marketplace snapshot:

```bash
codex plugin marketplace add CBEPX/cc-plugin-codex --ref v1.6.1
codex plugin marketplace add CBEPX/cc-plugin-codex --ref v1.7.0
codex plugin add cc@cbepx
```

Expand All @@ -59,8 +61,8 @@ The optional `npx` helper can install this fork release and enable the required
```bash
CC_PLUGIN_CODEX_MARKETPLACE_NAME=cbepx \
CC_PLUGIN_CODEX_MARKETPLACE_SOURCE=CBEPX/cc-plugin-codex \
CC_PLUGIN_CODEX_MARKETPLACE_REF=v1.6.1 \
npx -y https://github.com/CBEPX/cc-plugin-codex/releases/download/v1.6.1/cc-plugin-codex-1.6.1.tgz install
CC_PLUGIN_CODEX_MARKETPLACE_REF=v1.7.0 \
npx -y https://github.com/CBEPX/cc-plugin-codex/releases/download/v1.7.0/cc-plugin-codex-1.7.0.tgz install
```

On Windows, prefer the marketplace path or the `npx` helper. The shell-script helper below is POSIX-only.
Expand Down Expand Up @@ -106,17 +108,20 @@ When it finishes, Codex should nudge you toward the right result. If not, `$cc:s
| `$cc:review` | Read-only Claude Code review of your changes |
| `$cc:adversarial-review` | Design-challenging review — questions approach, tradeoffs, hidden assumptions |
| `$cc:rescue` | Hand a task to Claude Code — bugs, fixes, investigations, follow-ups |
| `$cc:design` | Compare technical alternatives with independent Codex and Claude evidence |
| `$cc:research` | Investigate a repository question with independent Codex and Claude evidence |
| `$cc:transfer` | Import the current Claude transcript into a resumable Codex thread |
| `$cc:status` | List running and recent Claude Code jobs, or inspect one job |
| `$cc:result` | Open the output of a finished job |
| `$cc:cancel` | Cancel an active background job |
| `$cc:status` | List jobs and aggregate peer workflows, or inspect one ID |
| `$cc:result` | Open a job result or peer checkpoint/final result |
| `$cc:cancel` | Cancel an active job or peer workflow |
| `$cc:mcp-diagnose` | Explain which Claude MCP tools would be available to reviews |
| `$cc:setup` | Verify installation, auth, hooks, and review gate |

Quick routing rule:
- Use `$cc:review` for straightforward correctness review of the current diff.
- Use `$cc:adversarial-review` for riskier config/template/migration/design changes, or whenever you want stronger challenge on assumptions and tradeoffs.
- Use `$cc:rescue` when you want Claude Code to investigate, validate by changing code, or actually fix/implement something.
- Use `$cc:design` or `$cc:research` when the decision benefits from two independent read-only evidence paths before synthesis.

### `$cc:review`

Expand Down Expand Up @@ -147,7 +152,7 @@ In foreground, review returns the result directly. In background, the plugin use

If the diff is too large to inline safely, the review prompt falls back to concise status/stat context and tells Claude to inspect the diff directly with read-only `git diff` commands instead of failing the run.

By default, review runs with only the bundled read-only git MCP. Repeat `--user-mcp-tool <mcp__server__tool>` to opt in specific Claude MCP tools from your user-scope Claude config for a run. Opted-in user MCP tools run as external Claude MCP processes and are auto-approved for that review, so use only trusted read-only tools when reviewing untrusted diffs. Project `.mcp.json` server definitions are ignored unless you also pass `--allow-project-mcp-servers`.
By default, review runs with only the bundled read-only git MCP. Repeat `--user-mcp-tool <mcp__server__tool>` to opt in specific Claude MCP tools from your user-scope Claude config for a run. Opted-in user MCP tools run as external Claude MCP processes and are auto-approved for that review, so use only trusted tools when reviewing untrusted diffs. Eligibility is based on the server's `readOnlyHint` declaration or the plugin's audited read-only registry; it is not an OS-enforced sandbox. A `destructiveHint` declaration is always vetoed. Project `.mcp.json` server definitions are ignored unless you also pass `--allow-project-mcp-servers`.

### `$cc:mcp-diagnose`

Expand All @@ -158,7 +163,28 @@ $cc:mcp-diagnose --user-mcp-tool mcp__context7__resolve-library-id
$cc:mcp-diagnose --allow-project-mcp-servers --user-mcp-tool mcp__localdocs__search
```

The diagnostic output lists server names and config sources only; it does not print raw MCP server configs or secrets.
The diagnostic actively starts/probes every configured server in scope (or sends HTTP initialize and tool-list requests), with a five-second absolute deadline per server. Treat that discovery as potentially side-effecting. The output lists server names and config sources only; it does not print raw MCP server configs or secrets. Once a peer workflow freezes its selected manifest, later turn revalidation probes only those selected servers.

### Peer design and research

`$cc:design` and `$cc:research` start a durable read-only workflow with exactly two independent branches: one Codex reasoning worker and one Claude forwarder. The initial branches receive the same frozen brief and cannot read each other's memo before sealing their own evidence.

```text
$cc:design compare the queue ownership alternatives
$cc:research trace how cancellation state reaches the public CLI
$cc:status <workflow-id>
$cc:result <workflow-id>
$cc:design --continue <workflow-id> optional feedback
$cc:design --retry <workflow-id>
```

New workflows default to Claude `fable` with `opus` fallback and inherited Codex model at `xhigh` effort. Use `--model`, `--fallback-model`, `--effort`, `--codex-model`, or `--codex-effort` to override them. Repeat `--user-mcp-tool <mcp__server__tool>` for explicitly trusted eligible tools; automatic selection is limited to the smallest relevant eligible set exposed to the active Codex turn. Eligibility records whether trust came from `readOnlyHint` or the audited registry, but does not independently enforce server behavior. Project MCP servers still require `--allow-project-mcp-servers`.

The stored and rendered workflow shows independent branch states, requested/final models and fallback events, source/tool evidence counts, selected public tool IDs and reasons, checkpoint or final result, and the exact continue/retry command. Raw MCP configuration, environment variables, headers, and credentials are never persisted or rendered. Claude receives no Bash, write, or Agent capability, and only selected MCP servers enter its strict runtime config. Peer turns also require the platform filesystem sandbox, deny unsandboxed commands and reads of canonical Codex/Claude state, persist no Claude transcript, and expose only content-free phase/tool/model-fallback progress before reveal. Native Windows peer execution is unsupported and isolation failures stop with `PEER_ISOLATION_UNAVAILABLE`.

Attempt leases are single-use secrets sent through stdin, while durable state keeps only their digests. A Claude-first memo remains process-local until Codex seals its independent memo. That wait has one absolute 30-minute deadline; retry keeps a committed waiter only while its current linked job is alive, rotates only unfinished reservations, and never rewrites completed payloads. A lost, terminal, or reaped worker becomes retryable, while unresolved process cancellation stays terminal as `cancel_failed`.

At the checkpoint, inspect the aggregate result and either continue with feedback or retry only failed/missing work. Continuation may run from a new Codex session: ownership is rebound explicitly, and critique starts a fresh ephemeral Claude turn from the frozen brief, memos, and feedback. SessionEnd marks unfinished work retryable after identity-checked linked-process cleanup; unresolved cancellation remains `cancel_failed`.

### `$cc:adversarial-review`

Expand Down Expand Up @@ -225,19 +251,19 @@ The SessionStart hook normally supplies the current transcript path automaticall
### `$cc:status`

```text
$cc:status # list active and recent jobs
$cc:status task-abc123 # detailed status for one job
$cc:status --all # show all tracked jobs in this repository workspace
$cc:status --wait task-abc123 # block until job completes
$cc:status # list jobs and aggregate peer workflows
$cc:status task-abc123 # detailed status for one job or workflow
$cc:status --all # include all workspace jobs, including workflow-linked jobs
$cc:status --wait task-abc123 # block until the job/workflow stops running
```

By default, `$cc:status` shows jobs owned by the current Codex session. Use `--all` when you want the wider repository view across older or sibling sessions in the same workspace.
By default, `$cc:status` shows current-session jobs plus one aggregate row per owned peer workflow; workflow-linked implementation jobs are hidden. Use `--all` for the wider repository view and linked-job diagnostics.

### `$cc:result`

```text
$cc:result # open the latest finished job for this session/repo
$cc:result task-abc123 # show finished job output
$cc:result # open the latest job or workflow result for this session/repo
$cc:result task-abc123 # show job output or a workflow checkpoint/final result
```

When a job came from a built-in background child, the output can show both:
Expand All @@ -253,9 +279,11 @@ claude --resume <session-id>
### `$cc:cancel`

```text
$cc:cancel task-abc123 # cancel a running job
$cc:cancel task-abc123 # cancel a running job or peer workflow
```

Workflow cancellation targets only its linked work. A missing or unverifiable process identity remains visible as `cancel_failed`; the plugin does not turn that state into a successful cancellation.

### `$cc:setup`

```text
Expand All @@ -274,7 +302,7 @@ All review and rescue commands support `--background`. Background jobs are track

1. **Queued → Running → Completed** — jobs progress through states automatically.
2. **Built-in subagent background flows** — background rescue, review, and adversarial review use Codex-managed subagent turns rather than stuffing `--background` into the companion command itself.
3. **Completion nudges** — when a background built-in flow finishes, the plugin tries to nudge the parent thread with the right `$cc:result <job-id>`. If that nudge cannot surface cleanly, unread-result hooks are the backstop.
3. **Completion nudges** — when a background built-in flow finishes, the plugin tries to nudge the parent thread with the right `$cc:result <job-id>`. Peer workflows notify only at an aggregate checkpoint, incomplete state, or final completion; linked jobs never produce duplicate nudges. If a nudge cannot surface cleanly, unread-result hooks are the backstop.
The nudge is intentionally just a pointer. The actual stored result still opens through `$cc:result`.
4. **Unread-result fallback** — when you submit your next prompt after a finished unread job, Codex can remind you that a result is waiting and point you to `$cc:status` / `$cc:result`.
5. **Session ownership** — jobs stay attached to the user-facing parent Codex session even when a built-in rescue/review child does the actual work, so plain `$cc:status`, `$cc:result`, and resume-candidate detection still follow the parent thread.
Expand Down Expand Up @@ -341,7 +369,7 @@ The review gate is an **optional** stop-time hook. When enabled, pressing Ctrl+C
Install from the fork's marketplace snapshot:

```bash
codex plugin marketplace add CBEPX/cc-plugin-codex --ref v1.6.1
codex plugin marketplace add CBEPX/cc-plugin-codex --ref v1.7.0
codex plugin add cc@cbepx
```

Expand All @@ -362,8 +390,8 @@ This fork does not install from the upstream Sendbird marketplace. Use the CBEPX
```bash
CC_PLUGIN_CODEX_MARKETPLACE_NAME=cbepx \
CC_PLUGIN_CODEX_MARKETPLACE_SOURCE=CBEPX/cc-plugin-codex \
CC_PLUGIN_CODEX_MARKETPLACE_REF=v1.6.1 \
npx -y https://github.com/CBEPX/cc-plugin-codex/releases/download/v1.6.1/cc-plugin-codex-1.6.1.tgz install
CC_PLUGIN_CODEX_MARKETPLACE_REF=v1.7.0 \
npx -y https://github.com/CBEPX/cc-plugin-codex/releases/download/v1.7.0/cc-plugin-codex-1.7.0.tgz install
```

After install, run:
Expand Down Expand Up @@ -393,7 +421,7 @@ $cc:setup
Re-run the fork marketplace install flow, pinned to the release you want:

```bash
codex plugin marketplace add CBEPX/cc-plugin-codex --ref v1.6.1
codex plugin marketplace add CBEPX/cc-plugin-codex --ref v1.7.0
codex plugin add cc@cbepx
```

Expand Down
Loading
Loading