Skip to content
OpenPlanr Docs
LearnGitHub (opens in a new tab)

openplanr delegate

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

Usage
openplanr delegate [options] [command]

Commands

  • probe

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

  • profile-preview

    Show the destination and readiness of a profile before saving it

  • profile-enroll

    Save a previewed profile after its destination is confirmed

  • profile-remove

    Remove a saved profile by name

  • prepare

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

  • prepare-worktree

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

  • dispatch

    Start the native agent for a prepared run

  • wait

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

  • status

    Report a run, its session, progress and saved report

  • resume

    Continue the recorded session with an answer or correction

  • recover

    Reconcile a run whose process ended without recording an outcome

  • close

    Close a run record with a disposition

  • cleanup

    Remove an owned worktree that holds no unreviewed work

  • abandon

    Discard a run that never executed, keeping any modified work

  • prune

    Delete closed run records past their retention

  • integrate

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

Notes

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

Usage
openplanr delegate probe [options]
Options for openplanr delegate probe
OptionDescription
--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

Notes

Example:
  openplanr delegate probe --json

openplanr delegate profile-preview

Show the destination and readiness of a profile before saving it

Usage
openplanr delegate profile-preview [options]
Options for openplanr delegate profile-preview
OptionDescription
--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

Usage
openplanr delegate profile-enroll [options]
Options for openplanr delegate profile-enroll
OptionDescription
--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

Usage
openplanr delegate profile-remove [options]
Options for openplanr delegate profile-remove
OptionDescription
--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

Usage
openplanr delegate prepare [options]
Options for openplanr delegate prepare
OptionDescription
--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

Notes

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

openplanr delegate prepare-worktree

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

Usage
openplanr delegate prepare-worktree [options]
Options for openplanr delegate prepare-worktree
OptionDescription
--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

Usage
openplanr delegate dispatch [options]
Options for openplanr delegate dispatch
OptionDescription
--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

Notes

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

openplanr delegate wait

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

Usage
openplanr delegate wait [options]
Options for openplanr delegate wait
OptionDescription
--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

Notes

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

openplanr delegate status

Report a run, its session, progress and saved report

Usage
openplanr delegate status [options]
Options for openplanr delegate status
OptionDescription
--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

Notes

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

openplanr delegate resume

Continue the recorded session with an answer or correction

Usage
openplanr delegate resume [options]
Options for openplanr delegate resume
OptionDescription
--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

Notes

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

Usage
openplanr delegate recover [options]
Options for openplanr delegate recover
OptionDescription
--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

Usage
openplanr delegate close [options]
Options for openplanr delegate close
OptionDescription
--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

Usage
openplanr delegate cleanup [options]
Options for openplanr delegate cleanup
OptionDescription
--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

Usage
openplanr delegate abandon [options]
Options for openplanr delegate abandon
OptionDescription
--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

Notes

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

openplanr delegate prune

Delete closed run records past their retention

Usage
openplanr delegate prune [options]
Options for openplanr delegate prune
OptionDescription
--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

Usage
openplanr delegate integrate [options] [command]

Commands

  • review

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

  • apply

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

  • recover

    Finish or roll back an interrupted apply

openplanr delegate integrate review

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

Usage
openplanr delegate integrate review [options]
Options for openplanr delegate integrate review
OptionDescription
--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

Notes

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

Usage
openplanr delegate integrate apply [options]
Options for openplanr delegate integrate apply
OptionDescription
--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

Notes

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

openplanr delegate integrate recover

Finish or roll back an interrupted apply

Usage
openplanr delegate integrate recover [options]
Options for openplanr delegate integrate recover
OptionDescription
--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