delegation-layer 0.1.21 → 0.1.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -225,6 +225,26 @@ choices. Per-model effort metadata is independent of the harness-wide list.
225
225
  Discovery exits `0` for `available` or `partial`, `2` for `blocked` or
226
226
  `unavailable`, and `1` for `failed`.
227
227
 
228
+ For Codex's native read-only review command, select `codex:review` and make
229
+ the Git state explicit:
230
+
231
+ ```sh
232
+ delegate --root "$HOME/delegation-state" dispatch \
233
+ --provider codex:review \
234
+ --review-target uncommitted \
235
+ --brief "$PWD/review-brief.txt" \
236
+ --cwd "$HOME/delegation-workspace" \
237
+ --permission read-only \
238
+ --budget 30m \
239
+ --json
240
+ ```
241
+
242
+ Use `base:BRANCH` or `commit:SHA` for a different review target. Review tasks
243
+ are persisted as read-only tasks and do not support continuation or active-turn
244
+ interaction. The brief is retained in the task evidence; Codex's explicit
245
+ review target supplies the native review scope because the Codex CLI does not
246
+ accept a prompt together with these target flags.
247
+
228
248
  If a task reports `status: "timed_out"` and
229
249
  `continuation.resumable: true`, continue the exact session:
230
250
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "delegation-layer",
3
- "version": "0.1.21",
3
+ "version": "0.1.25",
4
4
  "description": "Multi-provider AI agent delegation CLI and Agent Skill for running bounded coding tasks across provider CLIs.",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "delegation-layer",
3
3
  "displayName": "Delegation Layer",
4
- "version": "0.1.21",
4
+ "version": "0.1.25",
5
5
  "description": "Consult external AI harnesses and CCR-configured models for reviews, research, implementation, and debate through the resumable Delegate CLI.",
6
6
  "author": {
7
7
  "name": "Hesham Karam",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "delegation-layer",
3
- "version": "0.1.21",
3
+ "version": "0.1.25",
4
4
  "description": "Consult external AI harnesses and CCR-configured models for reviews, research, implementation, and debate through the resumable Delegate CLI.",
5
5
  "author": {
6
6
  "name": "Hesham Karam",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: agent-integration
3
- description: Coordinate external agent, model, and separate harness tasks through Delegate, including research, implementation, tests, reviews, consultations, comparisons, and debates. Use before choosing an external integration; ordinary native subagents and questions about tools remain local.
3
+ description: Use Delegate for work assigned to another agent, model, or separate harness CLI session. Load this before a provider-specific skill or plugin, including when a user names a CLI for research, implementation, tests, reviews, consultations, comparisons, or debates. A named destination still routes through Delegate. Ordinary same-harness subagents and questions about tools remain local; respect an explicit choice of another integration.
4
4
  ---
5
5
 
6
6
  # Delegation Layer
@@ -13,6 +13,8 @@ external harness to do work. Requests such as “ask Codex to review this”,
13
13
  collaboration even when the user never mentions Delegate. The same applies
14
14
  when you decide external expertise is useful to fulfill the user's task.
15
15
  These names are examples; discover supported destinations through the CLI.
16
+ A destination name identifies who should do the work; it does not by itself
17
+ select a provider-specific skill, plugin, or direct CLI integration.
16
18
  “Claude Code Router” and “CCR” mean `ccr:print`, not ordinary Claude Code.
17
19
  For that request, use Delegate with a CCR model alias; a Claude-specific skill
18
20
  or subscription model does not fulfill the requested route.
@@ -36,8 +38,10 @@ not turn that request into an environment-repair task. When a response says
36
38
  `failure.next_action: "stop_and_report"`, that attempt is finished. Include its
37
39
  failure in your final response without opening a clarification dialog to choose
38
40
  a fallback. For `task_record: not_created`, identify the requested destination
39
- and quote the returned `task_id` (if present), `task_record`, `failure`, and
40
- `error`. Do not append inferred state paths or provider-setup diagnoses. Do not run diagnostic commands, retry it, or use another integration.
41
+ and include the saved JSON failure response verbatim. A `task_id` can be returned
42
+ even when no task record was created. Do not infer that an unavailable provider
43
+ is uninstalled or unauthenticated. Do not append inferred state paths or
44
+ provider-setup diagnoses, run diagnostic commands, retry it, or use another integration.
41
45
  Troubleshooting requires a separate user request. Other independently requested
42
46
  tasks may proceed; the failed attempt must remain reported as failed or blocked.
43
47
 
@@ -79,23 +83,38 @@ tasks may proceed; the failed attempt must remain reported as failed or blocked.
79
83
  Collection may recover the
80
84
  saved supervisor only to observe an already-requested budget stop; it never
81
85
  launches a provider or retries a task.
82
- 6. If a task is timed out and its JSON says `continuation.resumable: true`, use
86
+ 6. If `failure.next_action` is `recheck`, follow
87
+ [offline recovery](references/result-handling.md#offline-recovery) once for
88
+ that task. Rechecking saved evidence does not run the provider again.
89
+ Otherwise, report a rejected result without redispatching or reading raw
90
+ output as an answer.
91
+ 7. If a task is timed out and its JSON says `continuation.resumable: true`, use
83
92
  `continue --task TASK_ID`, optionally with a new `--brief`. Do not create a
84
93
  fresh unrelated dispatch to replace a resumable task.
85
- 7. Treat `blocked` authentication as unresolved. Do not call it compatible,
94
+ 8. Treat `blocked` authentication as unresolved. Do not call it compatible,
86
95
  successful, or failed provider behavior, and do not invent login commands.
87
- 8. Never put credentials, tokens, or unrestricted provider output in a brief,
96
+ 9. Never put credentials, tokens, or unrestricted provider output in a brief,
88
97
  option, receipt, or agent message.
89
- 9. Permission modes select provider-native behavior, not an independent sandbox.
90
- Providers load their own configuration and extensions. If a task is rejected,
91
- report delegate's evidence; do not assume the user's configuration is faulty
92
- or remove MCP servers, plugins, settings, or credentials to make it pass.
93
- 10. The model chooses ordinary-task fan-out by issuing independent `dispatch`
98
+ 10. Permission modes select provider-native behavior, not an independent sandbox.
99
+ Providers load their own configuration and extensions. If a task is rejected,
100
+ report delegate's evidence; do not assume the user's configuration is faulty
101
+ or remove MCP servers, plugins, settings, or credentials to make it pass.
102
+ 11. The model chooses ordinary-task fan-out by issuing independent `dispatch`
94
103
  commands concurrently. The private supervisor does not impose a task-count
95
104
  or CPU-based limit. Use this for independent investigation, debate, review,
96
105
  or provider comparison. Concurrent write tasks must use separate workspaces
97
106
  or explicit coordination to avoid file conflicts.
98
107
 
108
+ For an explicit Codex code review, use the discoverable `codex:review` profile
109
+ with one persisted target: `--review-target uncommitted`,
110
+ `--review-target base:BRANCH`, or `--review-target commit:SHA`. It is read-only
111
+ and does not support `--interactive`, continuation, or workspace-write. Use
112
+ ordinary `codex:exec` when the request is a general investigation or asks the
113
+ provider to edit files; the review profile is for Codex's native review
114
+ operation and keeps the reviewed Git state explicit. The brief is retained as
115
+ task evidence; the review target supplies Codex's review scope because its
116
+ native command does not accept a prompt with the target flag.
117
+
99
118
  ## Operating procedure
100
119
 
101
120
  ### 1. Verify the control CLI
@@ -162,6 +181,8 @@ Use an existing task brief when one is supplied. Otherwise create a bounded
162
181
  brief file that contains the requested work and its acceptance criteria. Keep
163
182
  the state root outside the workspace and provider-writable trees (which can
164
183
  include the system temporary directory). Use `DELEGATE_ROOT` when supplied.
184
+ Pass a regular file path for `--brief`, not shell process substitution such as
185
+ `<(...)` or an ephemeral `/dev/fd/...` path.
165
186
 
166
187
  Run path preparation and dispatch in **one shell/tool invocation**, as shown
167
188
  below. Shell variables may disappear between tool calls. For later commands,
@@ -190,7 +211,10 @@ when waiting, replying, steering, or continuing.
190
211
 
191
212
  Use automatic selection unless the user named a destination.
192
213
  For a named harness or provider resolved in step 2, replace `--auto` with `--provider PROVIDER_ID`; never
193
- combine the two:
214
+ combine the two.
215
+
216
+ Capture the dispatch exit code with `if`, as below. This prints the response
217
+ even when dispatch fails and the surrounding shell has `set -e` enabled.
194
218
 
195
219
  ```sh
196
220
  WORKSPACE="$PWD"
@@ -200,13 +224,17 @@ cat >"$BRIEF" <<'EOF'
200
224
  Describe the delegated task, the files or behavior to change, and the checks
201
225
  that must pass. Keep the response concise and report validation evidence.
202
226
  EOF
203
- delegate --root "${DELEGATE_ROOT:-$HOME/delegation-state}" dispatch --auto \
227
+ printf 'Saved response: %s\n' "$RESPONSE"
228
+ if delegate --root "${DELEGATE_ROOT:-$HOME/delegation-state}" dispatch --auto \
204
229
  --brief "$BRIEF" \
205
230
  --cwd "$WORKSPACE" \
206
231
  --permission read-only \
207
232
  --budget 30m \
208
- --json >"$RESPONSE"
209
- dispatch_exit=$?
233
+ --json >"$RESPONSE"; then
234
+ dispatch_exit=0
235
+ else
236
+ dispatch_exit=$?
237
+ fi
210
238
  cat "$RESPONSE"
211
239
  printf '\nDispatch exit: %s; saved response: %s\n' "$dispatch_exit" "$RESPONSE"
212
240
  ```
@@ -5,7 +5,7 @@
5
5
  "name": "codex-review",
6
6
  "prompt": "Ask Codex to review pricing.py for correctness. Return the finding without editing files.",
7
7
  "external": true,
8
- "provider": "codex:exec",
8
+ "provider": "codex:review",
9
9
  "split": "development",
10
10
  "native_alternative_for": "codex"
11
11
  },
@@ -199,6 +199,32 @@
199
199
  ],
200
200
  "split": "validation"
201
201
  },
202
+ {
203
+ "name": "recheck-recoverable",
204
+ "prompt": "Ask a separate Codex CLI session to review pricing.py against README.md without editing. If the terminal result is rejected with failure.next_action=recheck, recheck the same task once and report only the verified recovered answer.",
205
+ "external": true,
206
+ "provider": "codex:exec",
207
+ "fixture_scenario": "recoverable-rejection",
208
+ "holdout": true,
209
+ "split": "validation"
210
+ },
211
+ {
212
+ "name": "recheck-still-rejected",
213
+ "prompt": "Ask a separate Codex CLI session to review pricing.py against README.md without editing. If the terminal result is rejected with failure.next_action=recheck, recheck the same task once and report the rejection without using raw output as an answer.",
214
+ "external": true,
215
+ "provider": "codex:exec",
216
+ "fixture_scenario": "still-rejected-recheck",
217
+ "holdout": true,
218
+ "split": "validation"
219
+ },
220
+ {
221
+ "name": "external-collaboration-holdout",
222
+ "prompt": "Ask a separate Codex CLI session to review pricing.py against README.md and report its finding without editing.",
223
+ "external": true,
224
+ "provider": "codex:exec",
225
+ "holdout": true,
226
+ "split": "validation"
227
+ },
202
228
  {
203
229
  "name": "requested-model-effort",
204
230
  "prompt": "Ask a separate Codex CLI session to review pricing.py without edits. Use model gpt-5.6-luna and effort max, preserving both choices.",
@@ -13,6 +13,7 @@ All paths passed to `--root`, `--cwd`, and `--brief` must be absolute. Add
13
13
  | `delegate dispatch --auto ... --json` | Select and admit one bounded turn | Yes, at most once |
14
14
  | `delegate status TASK --json` | Reconcile and observe task state | No provider launch |
15
15
  | `delegate collect TASK --watch 5s --json` | Read or wait for publication | No provider launch |
16
+ | `delegate recheck TASK --json` | Reassess eligible rejected evidence offline | No provider launch; original outcome unchanged |
16
17
  | `delegate continue --task TASK ... --json` | Create an exact-session successor | Yes, at most once for the successor |
17
18
  | `delegate reply TASK --request ID --answers FILE --id MESSAGE_ID --json` | Answer a pending native question | No new launch |
18
19
  | `delegate steer TASK --brief FILE --id MESSAGE_ID --json` | Guide a supported active turn | No new launch |
@@ -26,12 +27,15 @@ provider’s own responsibility and is never performed by this skill.
26
27
 
27
28
  Dispatch flags:
28
29
 
29
- - `--brief FILE`: bounded task instructions;
30
+ - `--brief FILE`: bounded task instructions; for `codex:review`, the brief is
31
+ retained as task evidence and the explicit review target supplies Codex's
32
+ native scope;
30
33
  - `--cwd ABS`: workspace for the delegated turn;
31
34
  - `--permission read-only|workspace-write`: read-only investigation or authorized unattended write execution, including commands (not independent containment);
32
35
  - `--budget DURATION`: finite turn budget;
33
36
  - `--auto`: let the CLI select a ready provider;
34
37
  - `--provider ID`: preserve the caller’s named harness or provider, resolved through the catalog;
38
+ - `--review-target uncommitted|base:BRANCH|commit:SHA`: select the explicit Git state for `codex:review`; it is required for that read-only profile and unsupported by other profiles;
35
39
  - `--model MODEL` and `--effort VALUE`: provider-advertised choices (CCR requires a model alias);
36
40
  Codex maps effort to TOML `model_reasoning_effort` for ordinary turns or a native
37
41
  turn parameter for interactive turns, while Claude and AGY
@@ -15,8 +15,9 @@ the same as a successful provider result.
15
15
  permits a linked successor even when no outcome has been published.
16
16
  4. If `publication` is committed and `outcome.verdict` is committed, return
17
17
  the result and its payload/evidence descriptors.
18
- 5. If `outcome.verdict` is rejected, report a terminal rejected result with its
19
- refusal and evidence. Do not retry automatically.
18
+ 5. If `outcome.verdict` is rejected and `failure.next_action` is `recheck`,
19
+ follow [offline recovery](#offline-recovery) once. Otherwise report the
20
+ terminal rejection with its diagnostic and evidence. Do not redispatch.
20
21
  6. If `pending.kind` is `interaction`, handle the returned questions using
21
22
  [interaction guidance](interaction.md) before waiting again. Otherwise, if
22
23
  `liveness` is queued or running or publication is pending, observe the same
@@ -44,3 +45,29 @@ checks static readiness; runtime verification requires the supervised probe.
44
45
  Versions and help are observations, not semantic-version allowlists.
45
46
  Authentication is a separate live gate (`not_run`, `passed`, or `blocked`).
46
47
  Report a blocked prerequisite without inventing a login command or retrying.
48
+
49
+ ## Offline recovery
50
+
51
+ When Delegate returns `failure.next_action: "recheck"`, use the same root and
52
+ exact task ID:
53
+
54
+ ```sh
55
+ delegate --root "${DELEGATE_ROOT:-$HOME/delegation-state}" recheck TASK_ID --json
56
+ ```
57
+
58
+ This command checks the already sealed evidence with an explicitly compatible
59
+ new interpreter. It does not run the provider, contact a service, spend model
60
+ tokens, or change the original outcome.
61
+
62
+ - Exit `0` with `recheck.status: "recovered"`: use only the answer descriptor
63
+ returned for that recheck. Report that the answer was recovered from saved
64
+ evidence. The original `publication` remains `rejected`; do not call the
65
+ original task committed or use recovery to infer continuation permission.
66
+ - Exit `4` with `recheck.status: "rejected"`: report the diagnostic and stop.
67
+ - Exit `1` or `2`, or any response without a verified recovered answer:
68
+ report the error and stop. Do not read raw streams as a substitute answer,
69
+ invent a result path, run a provider directly, or launch a replacement task.
70
+
71
+ Keep the assessment ID and source/target descriptors with the result. Do not
72
+ loop on the same recheck. A separate user request is required for further
73
+ troubleshooting or a new provider task.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: agent-integration
3
- description: Coordinate external agent, model, and separate harness tasks through Delegate, including research, implementation, tests, reviews, consultations, comparisons, and debates. Use before choosing an external integration; ordinary native subagents and questions about tools remain local.
3
+ description: Use Delegate for work assigned to another agent, model, or separate harness CLI session. Load this before a provider-specific skill or plugin, including when a user names a CLI for research, implementation, tests, reviews, consultations, comparisons, or debates. A named destination still routes through Delegate. Ordinary same-harness subagents and questions about tools remain local; respect an explicit choice of another integration.
4
4
  ---
5
5
 
6
6
  # Delegation Layer
@@ -13,6 +13,8 @@ external harness to do work. Requests such as “ask Codex to review this”,
13
13
  collaboration even when the user never mentions Delegate. The same applies
14
14
  when you decide external expertise is useful to fulfill the user's task.
15
15
  These names are examples; discover supported destinations through the CLI.
16
+ A destination name identifies who should do the work; it does not by itself
17
+ select a provider-specific skill, plugin, or direct CLI integration.
16
18
  “Claude Code Router” and “CCR” mean `ccr:print`, not ordinary Claude Code.
17
19
  For that request, use Delegate with a CCR model alias; a Claude-specific skill
18
20
  or subscription model does not fulfill the requested route.
@@ -36,8 +38,10 @@ not turn that request into an environment-repair task. When a response says
36
38
  `failure.next_action: "stop_and_report"`, that attempt is finished. Include its
37
39
  failure in your final response without opening a clarification dialog to choose
38
40
  a fallback. For `task_record: not_created`, identify the requested destination
39
- and quote the returned `task_id` (if present), `task_record`, `failure`, and
40
- `error`. Do not append inferred state paths or provider-setup diagnoses. Do not run diagnostic commands, retry it, or use another integration.
41
+ and include the saved JSON failure response verbatim. A `task_id` can be returned
42
+ even when no task record was created. Do not infer that an unavailable provider
43
+ is uninstalled or unauthenticated. Do not append inferred state paths or
44
+ provider-setup diagnoses, run diagnostic commands, retry it, or use another integration.
41
45
  Troubleshooting requires a separate user request. Other independently requested
42
46
  tasks may proceed; the failed attempt must remain reported as failed or blocked.
43
47
 
@@ -79,23 +83,38 @@ tasks may proceed; the failed attempt must remain reported as failed or blocked.
79
83
  Collection may recover the
80
84
  saved supervisor only to observe an already-requested budget stop; it never
81
85
  launches a provider or retries a task.
82
- 6. If a task is timed out and its JSON says `continuation.resumable: true`, use
86
+ 6. If `failure.next_action` is `recheck`, follow
87
+ [offline recovery](references/result-handling.md#offline-recovery) once for
88
+ that task. Rechecking saved evidence does not run the provider again.
89
+ Otherwise, report a rejected result without redispatching or reading raw
90
+ output as an answer.
91
+ 7. If a task is timed out and its JSON says `continuation.resumable: true`, use
83
92
  `continue --task TASK_ID`, optionally with a new `--brief`. Do not create a
84
93
  fresh unrelated dispatch to replace a resumable task.
85
- 7. Treat `blocked` authentication as unresolved. Do not call it compatible,
94
+ 8. Treat `blocked` authentication as unresolved. Do not call it compatible,
86
95
  successful, or failed provider behavior, and do not invent login commands.
87
- 8. Never put credentials, tokens, or unrestricted provider output in a brief,
96
+ 9. Never put credentials, tokens, or unrestricted provider output in a brief,
88
97
  option, receipt, or agent message.
89
- 9. Permission modes select provider-native behavior, not an independent sandbox.
90
- Providers load their own configuration and extensions. If a task is rejected,
91
- report delegate's evidence; do not assume the user's configuration is faulty
92
- or remove MCP servers, plugins, settings, or credentials to make it pass.
93
- 10. The model chooses ordinary-task fan-out by issuing independent `dispatch`
98
+ 10. Permission modes select provider-native behavior, not an independent sandbox.
99
+ Providers load their own configuration and extensions. If a task is rejected,
100
+ report delegate's evidence; do not assume the user's configuration is faulty
101
+ or remove MCP servers, plugins, settings, or credentials to make it pass.
102
+ 11. The model chooses ordinary-task fan-out by issuing independent `dispatch`
94
103
  commands concurrently. The private supervisor does not impose a task-count
95
104
  or CPU-based limit. Use this for independent investigation, debate, review,
96
105
  or provider comparison. Concurrent write tasks must use separate workspaces
97
106
  or explicit coordination to avoid file conflicts.
98
107
 
108
+ For an explicit Codex code review, use the discoverable `codex:review` profile
109
+ with one persisted target: `--review-target uncommitted`,
110
+ `--review-target base:BRANCH`, or `--review-target commit:SHA`. It is read-only
111
+ and does not support `--interactive`, continuation, or workspace-write. Use
112
+ ordinary `codex:exec` when the request is a general investigation or asks the
113
+ provider to edit files; the review profile is for Codex's native review
114
+ operation and keeps the reviewed Git state explicit. The brief is retained as
115
+ task evidence; the review target supplies Codex's review scope because its
116
+ native command does not accept a prompt with the target flag.
117
+
99
118
  ## Operating procedure
100
119
 
101
120
  ### 1. Verify the control CLI
@@ -162,6 +181,8 @@ Use an existing task brief when one is supplied. Otherwise create a bounded
162
181
  brief file that contains the requested work and its acceptance criteria. Keep
163
182
  the state root outside the workspace and provider-writable trees (which can
164
183
  include the system temporary directory). Use `DELEGATE_ROOT` when supplied.
184
+ Pass a regular file path for `--brief`, not shell process substitution such as
185
+ `<(...)` or an ephemeral `/dev/fd/...` path.
165
186
 
166
187
  Run path preparation and dispatch in **one shell/tool invocation**, as shown
167
188
  below. Shell variables may disappear between tool calls. For later commands,
@@ -190,7 +211,10 @@ when waiting, replying, steering, or continuing.
190
211
 
191
212
  Use automatic selection unless the user named a destination.
192
213
  For a named harness or provider resolved in step 2, replace `--auto` with `--provider PROVIDER_ID`; never
193
- combine the two:
214
+ combine the two.
215
+
216
+ Capture the dispatch exit code with `if`, as below. This prints the response
217
+ even when dispatch fails and the surrounding shell has `set -e` enabled.
194
218
 
195
219
  ```sh
196
220
  WORKSPACE="$PWD"
@@ -200,13 +224,17 @@ cat >"$BRIEF" <<'EOF'
200
224
  Describe the delegated task, the files or behavior to change, and the checks
201
225
  that must pass. Keep the response concise and report validation evidence.
202
226
  EOF
203
- delegate --root "${DELEGATE_ROOT:-$HOME/delegation-state}" dispatch --auto \
227
+ printf 'Saved response: %s\n' "$RESPONSE"
228
+ if delegate --root "${DELEGATE_ROOT:-$HOME/delegation-state}" dispatch --auto \
204
229
  --brief "$BRIEF" \
205
230
  --cwd "$WORKSPACE" \
206
231
  --permission read-only \
207
232
  --budget 30m \
208
- --json >"$RESPONSE"
209
- dispatch_exit=$?
233
+ --json >"$RESPONSE"; then
234
+ dispatch_exit=0
235
+ else
236
+ dispatch_exit=$?
237
+ fi
210
238
  cat "$RESPONSE"
211
239
  printf '\nDispatch exit: %s; saved response: %s\n' "$dispatch_exit" "$RESPONSE"
212
240
  ```
@@ -5,7 +5,7 @@
5
5
  "name": "codex-review",
6
6
  "prompt": "Ask Codex to review pricing.py for correctness. Return the finding without editing files.",
7
7
  "external": true,
8
- "provider": "codex:exec",
8
+ "provider": "codex:review",
9
9
  "split": "development",
10
10
  "native_alternative_for": "codex"
11
11
  },
@@ -199,6 +199,32 @@
199
199
  ],
200
200
  "split": "validation"
201
201
  },
202
+ {
203
+ "name": "recheck-recoverable",
204
+ "prompt": "Ask a separate Codex CLI session to review pricing.py against README.md without editing. If the terminal result is rejected with failure.next_action=recheck, recheck the same task once and report only the verified recovered answer.",
205
+ "external": true,
206
+ "provider": "codex:exec",
207
+ "fixture_scenario": "recoverable-rejection",
208
+ "holdout": true,
209
+ "split": "validation"
210
+ },
211
+ {
212
+ "name": "recheck-still-rejected",
213
+ "prompt": "Ask a separate Codex CLI session to review pricing.py against README.md without editing. If the terminal result is rejected with failure.next_action=recheck, recheck the same task once and report the rejection without using raw output as an answer.",
214
+ "external": true,
215
+ "provider": "codex:exec",
216
+ "fixture_scenario": "still-rejected-recheck",
217
+ "holdout": true,
218
+ "split": "validation"
219
+ },
220
+ {
221
+ "name": "external-collaboration-holdout",
222
+ "prompt": "Ask a separate Codex CLI session to review pricing.py against README.md and report its finding without editing.",
223
+ "external": true,
224
+ "provider": "codex:exec",
225
+ "holdout": true,
226
+ "split": "validation"
227
+ },
202
228
  {
203
229
  "name": "requested-model-effort",
204
230
  "prompt": "Ask a separate Codex CLI session to review pricing.py without edits. Use model gpt-5.6-luna and effort max, preserving both choices.",
@@ -13,6 +13,7 @@ All paths passed to `--root`, `--cwd`, and `--brief` must be absolute. Add
13
13
  | `delegate dispatch --auto ... --json` | Select and admit one bounded turn | Yes, at most once |
14
14
  | `delegate status TASK --json` | Reconcile and observe task state | No provider launch |
15
15
  | `delegate collect TASK --watch 5s --json` | Read or wait for publication | No provider launch |
16
+ | `delegate recheck TASK --json` | Reassess eligible rejected evidence offline | No provider launch; original outcome unchanged |
16
17
  | `delegate continue --task TASK ... --json` | Create an exact-session successor | Yes, at most once for the successor |
17
18
  | `delegate reply TASK --request ID --answers FILE --id MESSAGE_ID --json` | Answer a pending native question | No new launch |
18
19
  | `delegate steer TASK --brief FILE --id MESSAGE_ID --json` | Guide a supported active turn | No new launch |
@@ -26,12 +27,15 @@ provider’s own responsibility and is never performed by this skill.
26
27
 
27
28
  Dispatch flags:
28
29
 
29
- - `--brief FILE`: bounded task instructions;
30
+ - `--brief FILE`: bounded task instructions; for `codex:review`, the brief is
31
+ retained as task evidence and the explicit review target supplies Codex's
32
+ native scope;
30
33
  - `--cwd ABS`: workspace for the delegated turn;
31
34
  - `--permission read-only|workspace-write`: read-only investigation or authorized unattended write execution, including commands (not independent containment);
32
35
  - `--budget DURATION`: finite turn budget;
33
36
  - `--auto`: let the CLI select a ready provider;
34
37
  - `--provider ID`: preserve the caller’s named harness or provider, resolved through the catalog;
38
+ - `--review-target uncommitted|base:BRANCH|commit:SHA`: select the explicit Git state for `codex:review`; it is required for that read-only profile and unsupported by other profiles;
35
39
  - `--model MODEL` and `--effort VALUE`: provider-advertised choices (CCR requires a model alias);
36
40
  Codex maps effort to TOML `model_reasoning_effort` for ordinary turns or a native
37
41
  turn parameter for interactive turns, while Claude and AGY
@@ -15,8 +15,9 @@ the same as a successful provider result.
15
15
  permits a linked successor even when no outcome has been published.
16
16
  4. If `publication` is committed and `outcome.verdict` is committed, return
17
17
  the result and its payload/evidence descriptors.
18
- 5. If `outcome.verdict` is rejected, report a terminal rejected result with its
19
- refusal and evidence. Do not retry automatically.
18
+ 5. If `outcome.verdict` is rejected and `failure.next_action` is `recheck`,
19
+ follow [offline recovery](#offline-recovery) once. Otherwise report the
20
+ terminal rejection with its diagnostic and evidence. Do not redispatch.
20
21
  6. If `pending.kind` is `interaction`, handle the returned questions using
21
22
  [interaction guidance](interaction.md) before waiting again. Otherwise, if
22
23
  `liveness` is queued or running or publication is pending, observe the same
@@ -44,3 +45,29 @@ checks static readiness; runtime verification requires the supervised probe.
44
45
  Versions and help are observations, not semantic-version allowlists.
45
46
  Authentication is a separate live gate (`not_run`, `passed`, or `blocked`).
46
47
  Report a blocked prerequisite without inventing a login command or retrying.
48
+
49
+ ## Offline recovery
50
+
51
+ When Delegate returns `failure.next_action: "recheck"`, use the same root and
52
+ exact task ID:
53
+
54
+ ```sh
55
+ delegate --root "${DELEGATE_ROOT:-$HOME/delegation-state}" recheck TASK_ID --json
56
+ ```
57
+
58
+ This command checks the already sealed evidence with an explicitly compatible
59
+ new interpreter. It does not run the provider, contact a service, spend model
60
+ tokens, or change the original outcome.
61
+
62
+ - Exit `0` with `recheck.status: "recovered"`: use only the answer descriptor
63
+ returned for that recheck. Report that the answer was recovered from saved
64
+ evidence. The original `publication` remains `rejected`; do not call the
65
+ original task committed or use recovery to infer continuation permission.
66
+ - Exit `4` with `recheck.status: "rejected"`: report the diagnostic and stop.
67
+ - Exit `1` or `2`, or any response without a verified recovered answer:
68
+ report the error and stop. Do not read raw streams as a substitute answer,
69
+ invent a result path, run a provider directly, or launch a replacement task.
70
+
71
+ Keep the assessment ID and source/target descriptors with the result. Do not
72
+ loop on the same recheck. A separate user request is required for further
73
+ troubleshooting or a new provider task.