Skip to content

Commit c6a6599

Browse files
committed
docs(plugins): document CLI recovery policy
1 parent 2c7b8a0 commit c6a6599

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

‎docs/plugins/cli-backend-plugins.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,23 @@ model-alias, session, image, and watchdog fields as the bundled
215215
| `imagePathScope` | Where staged image files live before handoff: `temp` or `workspace` |
216216
| `serialize` | Keep same-backend runs ordered |
217217
| `reseedFromRawTranscriptWhenUncompacted` | Opt in to bounded raw-transcript reseed before compaction for safe session resets |
218+
| `freshSessionRecovery` | Fresh recovery policy after a recoverable resumed-session failure |
218219
| `reliability.watchdog` | No-output timeout tuning, separate for fresh vs resumed runs |
219220

221+
`freshSessionRecovery` is a backend-owned compatibility contract:
222+
223+
- Leave it undefined or set it to `"replace-binding"` to preserve the legacy
224+
clear-and-reseed behavior. OpenClaw clears the persisted binding and retries
225+
with a fresh session when the failure is eligible for recovery.
226+
- Set it to `"invalidated-only"` to suppress fresh replacement unless the
227+
canonical invalidation predicate proves the old session is dead. Currently,
228+
only `session_expired` does so.
229+
230+
Choose the value from the CLI or SDK session contract, not from a provider id
231+
or broad error class. The bundled Anthropic backend uses `"invalidated-only"`;
232+
its Agent SDK contract does not treat non-expiration failures as proof that the
233+
conversation can no longer resume.
234+
220235
Prefer the smallest static config that matches the CLI. Add plugin callbacks
221236
only for behavior that really belongs to the backend.
222237

0 commit comments

Comments
 (0)