Use this skill for OpenClaw session recovery and branching.
ClawReverse is a native OpenClaw plugin that adds the openclaw reverse command family for checkpoint listing, rollback, continue, checkout, and lineage inspection.
rollback rewinds the current session to a checkpoint. By default it does not restore the live workspace files unless --restore-workspace is used.continue requires a non-empty --prompt and creates a new child agent, new workspace, and new session, leaving the parent untouched.checkout creates a new session in the same agent from a checkpoint-backed entry. --continue can immediately start a run in that new session.tree is the fastest way to explain lineage and branch points to a user.--json whenever another tool needs machine-readable output.openclaw.jsonbash
openclaw reverse --help
bash
openclaw plugins install -l "{baseDir}"
bash
openclaw reverse setup
bash
openclaw reverse --help
If the OpenClaw state directory is not the default one, use:
bash
openclaw reverse setup --base-dir /path/to/openclaw-state
setup#json
{
"plugins": {
"allow": ["clawreverse"],
"enabled": true,
"entries": {
"clawreverse": {
"enabled": true,
"config": {
"workspaceRoots": ["~/.openclaw/workspace"],
"checkpointDir": "~/.openclaw/plugins/clawreverse/checkpoints",
"registryDir": "~/.openclaw/plugins/clawreverse/registry",
"runtimeDir": "~/.openclaw/plugins/clawreverse/runtime",
"reportsDir": "~/.openclaw/plugins/clawreverse/reports",
"maxCheckpointsPerSession": 100,
"allowContinuePrompt": true,
"stopRunBeforeRollback": true
}
}
}
}
}
bash
openclaw reverse agents
openclaw reverse sessions --agent <agent-id>
Use the value in the Agent column as the agent id and the value in the Session column as the session id. The row marked latest is the newest session.
bash
openclaw reverse checkpoints --agent <agent-id> --session <session-id>
If you need details for one checkpoint:
bash
openclaw reverse checkpoint --checkpoint <checkpoint-id>
Use this when the user wants to rewind the current session to an earlier point.
bash
openclaw reverse rollback \
--agent <agent-id> \
--session <session-id> \
--checkpoint <checkpoint-id>
Only add --restore-workspace when the user explicitly wants the current on-disk workspace restored too:
bash
openclaw reverse rollback \
--agent <agent-id> \
--session <session-id> \
--checkpoint <checkpoint-id> \
--restore-workspace
Use this when the parent session and workspace must stay untouched and the user wants a fresh attempt from a known-good checkpoint.
bash
openclaw reverse continue \
--agent <agent-id> \
--session <session-id> \
--checkpoint <checkpoint-id> \
--prompt "Continue from here with a different approach."
Optional advanced flags:
--new-agent <agent-id> to force the child agent id--clone-auth <auto|always|never> for auth-copy behavior--log to capture child launch diagnostics and return logFilePathUse this when the user wants a new session from a checkpoint-backed entry without creating a new agent.
bash
openclaw reverse nodes --agent <agent-id> --session <session-id>
openclaw reverse checkout \
--agent <agent-id> \
--source-session <session-id> \
--entry <entry-id>
To start running immediately after checkout:
bash
openclaw reverse checkout \
--agent <agent-id> \
--source-session <session-id> \
--entry <entry-id> \
--continue \
--prompt "Continue from this restored entry."
bash
openclaw reverse rollback-status --agent <agent-id> --session <session-id>
openclaw reverse tree --agent <agent-id> --session <session-id>
openclaw reverse report --rollback <rollback-id>
openclaw reverse branch --branch <branch-id>
tree also supports automatic root selection and subtree inspection:
bash
openclaw reverse tree
openclaw reverse tree --node <checkpoint-id>
CommandPurposeopenclaw reverse setupPatch openclaw.json and create plugin directoriesopenclaw reverse statusShow plugin runtime statusopenclaw reverse agentsList configured agentsopenclaw reverse sessions --agent ...List sessions for one agentopenclaw reverse checkpoints --agent ... --session ...List checkpoints for a sessionopenclaw reverse checkpoint --checkpoint ...Inspect one checkpoint by idopenclaw reverse rollback-status --agent ... --session ...Show rollback state for a sessionopenclaw reverse rollback ...Rewind a session to a checkpointopenclaw reverse continue ... --prompt ...Create a child agent, workspace, and session from a checkpointopenclaw reverse nodes --agent ... --session ...List checkpoint-backed entries that support checkoutopenclaw reverse tree ...Display checkpoint lineage as a treeopenclaw reverse checkout ...Create a new session from a checkpoint-backed entryopenclaw reverse report --rollback ...Inspect a rollback reportopenclaw reverse branch --branch ...Inspect a saved branch record
continue over rollback when the user wants to preserve the parent line untouched.rollback when the user wants the current line moved back to an earlier checkpoint.--restore-workspace if the user has not clearly requested live file restoration.read, glob, ls, git status, find, cat, grep, diff, tree, and similar commands are intentionally skipped.--json for programmatic parsing or when you want to feed results into another tool.{baseDir}, npm test runs the repository test suite.openclaw reverse is missing#openclaw plugins install -l "{baseDir}"openclaw reverse setupclawreverse is in plugins.allowplugins.entries.clawreverse.enabled is truecontinue fails#--prompt is non-empty--new-agent <fresh-id>--log, inspect the returned logFilePathrollback did not change files#That is expected unless --restore-workspace was used.
tree or checkpoints shows nothing#