diff --git a/docs/specification.md b/docs/specification.md index f020b553e..ba29f81d8 100644 --- a/docs/specification.md +++ b/docs/specification.md @@ -344,6 +344,7 @@ The following standards are integrated into the architecture: agents plan artifacts <PLAN_ID> agents plan prompt <PLAN_ID> <GUIDANCE> agents plan rollback [--yes|-y] <PLAN_ID> <CHECKPOINT_ID> +agents plan errors <PLAN_ID> agents action create --config|-c <CFG_FILE> agents action list [(--namespace|-n) <NS>] [(--state|-s) <STATE>] [<REGEX>] @@ -15823,6 +15824,97 @@ List artifacts produced by a plan. - "4 artifacts listed" ``` +##### agents plan errors + +
agents plan errors <PLAN_ID>
+ +**Purpose** +Show error decisions with recovery hints and retry history for a plan. + +**Arguments** + +- ``: Plan ID (ULID). + +**Examples** + +=== "Rich" + +

+    $ agents plan errors 01HXM8C2ZK4Q7C2B3F2R4VYV6J
+
+    ╭─ Plan Errors ──────────────────────────────────────────────────────╮
+    │ Plan: 01HXM8C2ZK4Q7C2B3F2R4VYV6J                                  │
+    │ Phase: execute                                                    │
+    │ State: errored                                                    │
+    │ Error: Tool execution failed: write_file permission denied         │
+    │                                                                    │
+    │ Error Category: tool_execution                                    │
+    │ Error Phase: execute                                              │
+    │ Retry Count: 2/3                                                  │
+    │ Retriable: true                                                   │
+    │                                                                    │
+    │ Recovery Suggestions:                                             │
+    │   → Check sandbox permissions and retry execution                  │
+    │     $ agents plan execute 01HXM8C2ZK4Q7C2B3F2R4VYV6J              │
+    │   → Revert to Strategize phase to adjust the plan                  │
+    │     $ agents plan correct --mode revert -g "..." <DECISION_ID>     │
+    ╰────────────────────────────────────────────────────────────────────╯
+
+    ✓ OK
+    
+ +=== "Plain" + + ``` + $ agents plan errors 01HXM8C2ZK4Q7C2B3F2R4VYV6J + + Plan Errors + Plan: 01HXM8C2ZK4Q7C2B3F2R4VYV6J + Phase: execute + State: errored + Error: Tool execution failed: write_file permission denied + Error Category: tool_execution + Error Phase: execute + Retry Count: 2/3 + Retriable: true + + Recovery Suggestions + → Check sandbox permissions and retry execution + $ agents plan execute 01HXM8C2ZK4Q7C2B3F2R4VYV6J + → Revert to Strategize phase to adjust the plan + $ agents plan correct --mode revert -g "..." + + [OK] + ``` + +=== "JSON" + + ```json + { + "plan_id": "01HXM8C2ZK4Q7C2B3F2R4VYV6J", + "phase": "execute", + "state": "errored", + "error_message": "Tool execution failed: write_file permission denied", + "error_category": "tool_execution", + "error_phase": "execute", + "retry_count": 2, + "max_retries": 3, + "is_retriable": true, + "recovery_hints": [ + { + "action": "retry", + "message": "Check sandbox permissions and retry execution", + "cli_command": "agents plan execute 01HXM8C2ZK4Q7C2B3F2R4VYV6J" + }, + { + "action": "revert", + "message": "Revert to Strategize phase to adjust the plan", + "cli_command": "agents plan correct --mode revert -g \"...\" " + } + ] + } + ``` + ##### agents plan prompt
agents plan prompt <PLAN_ID> <GUIDANCE>