---
title: openplanr delegate
description: "openplanr delegate: Hand one scoped implementation to Claude Code, Codex or Cursor, then review and integrate its changes. Subcommands: probe."
url: https://openplanr.dev/docs/cli/delegate
updated: 2026-11-17
related:
  - https://openplanr.dev/docs/cli/graph.md
  - https://openplanr.dev/docs/cli/search.md
  - https://openplanr.dev/docs/cli/release.md
---

# openplanr delegate

Hand one scoped implementation to Claude Code, Codex or Cursor, then review and integrate its changes

```text
openplanr delegate [options] [command]
```

```text
Every action prints { ok, action, contract, result, next } with --json, or
{ ok: false, code, problem, recovery } with exit code 1. See docs/CLI.md.
```

## openplanr delegate probe

Discover Git, installed Claude Code, Codex and Cursor CLIs, and saved profiles

```text
openplanr delegate probe [options]
```

Options:

- `--input <file>`: JSON object with the action fields; "-" reads stdin
- `--run <runId>`: run identifier; merged into the input as runId
- `--json`: machine-readable output; default `false`

```text
Example:
  openplanr delegate probe --json
```

## openplanr delegate profile-preview

Show the destination and readiness of a profile before saving it

```text
openplanr delegate profile-preview [options]
```

Options:

- `--input <file>`: JSON object with the action fields; "-" reads stdin
- `--run <runId>`: run identifier; merged into the input as runId
- `--json`: machine-readable output; default `false`

## openplanr delegate profile-enroll

Save a previewed profile after its destination is confirmed

```text
openplanr delegate profile-enroll [options]
```

Options:

- `--input <file>`: JSON object with the action fields; "-" reads stdin
- `--run <runId>`: run identifier; merged into the input as runId
- `--json`: machine-readable output; default `false`

## openplanr delegate profile-remove

Remove a saved profile by name

```text
openplanr delegate profile-remove [options]
```

Options:

- `--input <file>`: JSON object with the action fields; "-" reads stdin
- `--run <runId>`: run identifier; merged into the input as runId
- `--json`: machine-readable output; default `false`

## openplanr delegate prepare

Build the context capsule and owned worktree, and return the preview to confirm

```text
openplanr delegate prepare [options]
```

Options:

- `--input <file>`: JSON object with the action fields; "-" reads stdin
- `--run <runId>`: run identifier; merged into the input as runId
- `--json`: machine-readable output; default `false`

```text
Example:
  openplanr delegate prepare --input prepare.json --json
```

## openplanr delegate prepare-worktree

Run parent-selected setup commands in the owned worktree before dispatch

```text
openplanr delegate prepare-worktree [options]
```

Options:

- `--input <file>`: JSON object with the action fields; "-" reads stdin
- `--run <runId>`: run identifier; merged into the input as runId
- `--json`: machine-readable output; default `false`

## openplanr delegate dispatch

Start the native agent for a prepared run

```text
openplanr delegate dispatch [options]
```

Options:

- `--input <file>`: JSON object with the action fields; "-" reads stdin
- `--run <runId>`: run identifier; merged into the input as runId
- `--json`: machine-readable output; default `false`

```text
Example:
  openplanr delegate dispatch --run <runId> --json
```

## openplanr delegate wait

Wait a bounded time for a running delegate, then report its state

```text
openplanr delegate wait [options]
```

Options:

- `--input <file>`: JSON object with the action fields; "-" reads stdin
- `--run <runId>`: run identifier; merged into the input as runId
- `--json`: machine-readable output; default `false`

```text
Example:
  openplanr delegate wait --run <runId> --json
```

## openplanr delegate status

Report a run, its session, progress and saved report

```text
openplanr delegate status [options]
```

Options:

- `--input <file>`: JSON object with the action fields; "-" reads stdin
- `--run <runId>`: run identifier; merged into the input as runId
- `--json`: machine-readable output; default `false`

```text
Example:
  openplanr delegate status --run <runId> --json
```

## openplanr delegate resume

Continue the recorded session with an answer or correction

```text
openplanr delegate resume [options]
```

Options:

- `--input <file>`: JSON object with the action fields; "-" reads stdin
- `--run <runId>`: run identifier; merged into the input as runId
- `--json`: machine-readable output; default `false`

```text
Example:
  echo '{"runId":"<runId>","correction":"Fix the failing test."}' | openplanr delegate resume --input - --json
```

## openplanr delegate recover

Reconcile a run whose process ended without recording an outcome

```text
openplanr delegate recover [options]
```

Options:

- `--input <file>`: JSON object with the action fields; "-" reads stdin
- `--run <runId>`: run identifier; merged into the input as runId
- `--json`: machine-readable output; default `false`

## openplanr delegate close

Close a run record with a disposition

```text
openplanr delegate close [options]
```

Options:

- `--input <file>`: JSON object with the action fields; "-" reads stdin
- `--run <runId>`: run identifier; merged into the input as runId
- `--json`: machine-readable output; default `false`

## openplanr delegate cleanup

Remove an owned worktree that holds no unreviewed work

```text
openplanr delegate cleanup [options]
```

Options:

- `--input <file>`: JSON object with the action fields; "-" reads stdin
- `--run <runId>`: run identifier; merged into the input as runId
- `--json`: machine-readable output; default `false`

## openplanr delegate abandon

Discard a run that never executed, keeping any modified work

```text
openplanr delegate abandon [options]
```

Options:

- `--input <file>`: JSON object with the action fields; "-" reads stdin
- `--run <runId>`: run identifier; merged into the input as runId
- `--json`: machine-readable output; default `false`

```text
Example:
  openplanr delegate abandon --run <runId> --json
```

## openplanr delegate prune

Delete closed run records past their retention

```text
openplanr delegate prune [options]
```

Options:

- `--input <file>`: JSON object with the action fields; "-" reads stdin
- `--run <runId>`: run identifier; merged into the input as runId
- `--json`: machine-readable output; default `false`

## openplanr delegate integrate

Review, apply or recover the observed patch of a finished run

```text
openplanr delegate integrate [options] [command]
```

### openplanr delegate integrate review

Review the observed patch against the integration scope; nothing is applied

```text
openplanr delegate integrate review [options]
```

Options:

- `--input <file>`: JSON object with the action fields; "-" reads stdin
- `--run <runId>`: run identifier; merged into the input as runId
- `--json`: machine-readable output; default `false`

```text
Example:
  echo '{"runId":"<runId>","scopePaths":["src"]}' | openplanr delegate integrate review --input - --json
```

### openplanr delegate integrate apply

Run the selected checks and apply the reviewed patch as an uncommitted diff

```text
openplanr delegate integrate apply [options]
```

Options:

- `--input <file>`: JSON object with the action fields; "-" reads stdin
- `--run <runId>`: run identifier; merged into the input as runId
- `--json`: machine-readable output; default `false`

```text
Example:
  openplanr delegate integrate apply --input apply.json --json
```

### openplanr delegate integrate recover

Finish or roll back an interrupted apply

```text
openplanr delegate integrate recover [options]
```

Options:

- `--input <file>`: JSON object with the action fields; "-" reads stdin
- `--run <runId>`: run identifier; merged into the input as runId
- `--json`: machine-readable output; default `false`
