Clawreverse
/install clawreverse-skill
ClawReverse
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.
Use this skill when
- a user wants to undo a bad OpenClaw tool call or recover from unwanted file changes
- a user wants to restore a known-good point without rerunning the whole task
- a user wants to branch from an earlier checkpoint and keep the parent session untouched
- a user wants to inspect checkpoint lineage, rollback status, rollback reports, or branch records
- a user wants to save tokens after a long analysis run by continuing from a checkpoint instead of starting over
Do not use this skill when
- the task is a normal git revert, git checkout, or git branch workflow that should be handled directly with git
- the workspace is not managed by OpenClaw
- there are no OpenClaw sessions or checkpoints to operate on yet
Key behavior you should know first
- ClawReverse creates checkpoints before mutating tool calls. Read-only tools and read-only shell commands do not create checkpoints.
rollbackrewinds the current session to a checkpoint. By default it does not restore the live workspace files unless--restore-workspaceis used.continuerequires a non-empty--promptand creates a new child agent, new workspace, and new session, leaving the parent untouched.checkoutcreates a new session in the same agent from a checkpoint-backed entry.--continuecan immediately start a run in that new session.treeis the fastest way to explain lineage and branch points to a user.- Add
--jsonwhenever another tool needs machine-readable output.
Prerequisites
- a working OpenClaw installation
- access to the machine that runs OpenClaw
- a valid
openclaw.json - the ClawReverse plugin files available in this skill bundle
First step: verify or install the plugin
- Check whether the plugin is already available:
openclaw reverse --help
- If the command is missing, install the plugin from this skill bundle:
openclaw plugins install -l "{baseDir}"
- Then initialize or repair config:
openclaw reverse setup
- Restart the OpenClaw Gateway after install or config changes, then verify again:
openclaw reverse --help
If the OpenClaw state directory is not the default one, use:
openclaw reverse setup --base-dir /path/to/openclaw-state
Default config created by setup
{
"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
}
}
}
}
}
Standard workflow
1) Identify the target agent and session
openclaw reverse agents
openclaw reverse sessions --agent \x3Cagent-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.
2) List checkpoints
openclaw reverse checkpoints --agent \x3Cagent-id> --session \x3Csession-id>
If you need details for one checkpoint:
openclaw reverse checkpoint --checkpoint \x3Ccheckpoint-id>
3) Choose the correct action
Roll back the current line
Use this when the user wants to rewind the current session to an earlier point.
openclaw reverse rollback \
--agent \x3Cagent-id> \
--session \x3Csession-id> \
--checkpoint \x3Ccheckpoint-id>
Only add --restore-workspace when the user explicitly wants the current on-disk workspace restored too:
openclaw reverse rollback \
--agent \x3Cagent-id> \
--session \x3Csession-id> \
--checkpoint \x3Ccheckpoint-id> \
--restore-workspace
Continue as a safe child branch
Use this when the parent session and workspace must stay untouched and the user wants a fresh attempt from a known-good checkpoint.
openclaw reverse continue \
--agent \x3Cagent-id> \
--session \x3Csession-id> \
--checkpoint \x3Ccheckpoint-id> \
--prompt "Continue from here with a different approach."
Optional advanced flags:
--new-agent \x3Cagent-id>to force the child agent id--clone-auth \x3Cauto|always|never>for auth-copy behavior--logto capture child launch diagnostics and returnlogFilePath
Checkout into a new session in the same agent
Use this when the user wants a new session from a checkpoint-backed entry without creating a new agent.
openclaw reverse nodes --agent \x3Cagent-id> --session \x3Csession-id>
openclaw reverse checkout \
--agent \x3Cagent-id> \
--source-session \x3Csession-id> \
--entry \x3Centry-id>
To start running immediately after checkout:
openclaw reverse checkout \
--agent \x3Cagent-id> \
--source-session \x3Csession-id> \
--entry \x3Centry-id> \
--continue \
--prompt "Continue from this restored entry."
4) Inspect status, reports, and lineage
openclaw reverse rollback-status --agent \x3Cagent-id> --session \x3Csession-id>
openclaw reverse tree --agent \x3Cagent-id> --session \x3Csession-id>
openclaw reverse report --rollback \x3Crollback-id>
openclaw reverse branch --branch \x3Cbranch-id>
tree also supports automatic root selection and subtree inspection:
openclaw reverse tree
openclaw reverse tree --node \x3Ccheckpoint-id>
Command quick reference
| Command | Purpose |
|---|---|
openclaw reverse setup |
Patch openclaw.json and create plugin directories |
openclaw reverse status |
Show plugin runtime status |
openclaw reverse agents |
List configured agents |
openclaw reverse sessions --agent ... |
List sessions for one agent |
openclaw reverse checkpoints --agent ... --session ... |
List checkpoints for a session |
openclaw reverse checkpoint --checkpoint ... |
Inspect one checkpoint by id |
openclaw reverse rollback-status --agent ... --session ... |
Show rollback state for a session |
openclaw reverse rollback ... |
Rewind a session to a checkpoint |
openclaw reverse continue ... --prompt ... |
Create a child agent, workspace, and session from a checkpoint |
openclaw reverse nodes --agent ... --session ... |
List checkpoint-backed entries that support checkout |
openclaw reverse tree ... |
Display checkpoint lineage as a tree |
openclaw reverse checkout ... |
Create a new session from a checkpoint-backed entry |
openclaw reverse report --rollback ... |
Inspect a rollback report |
openclaw reverse branch --branch ... |
Inspect a saved branch record |
Guardrails
- Prefer
continueoverrollbackwhen the user wants to preserve the parent line untouched. - Prefer
rollbackwhen the user wants the current line moved back to an earlier checkpoint. - Ask before using
--restore-workspaceif the user has not clearly requested live file restoration. - If no checkpoints appear, explain that ClawReverse only records checkpoints before mutating tools or mutating shell commands. Read-only operations such as
read,glob,ls,git status,find,cat,grep,diff,tree, and similar commands are intentionally skipped. - Use
--jsonfor programmatic parsing or when you want to feed results into another tool. - From
{baseDir},npm testruns the repository test suite.
Troubleshooting
openclaw reverse is missing
- re-run
openclaw plugins install -l "{baseDir}" - run
openclaw reverse setup - restart the Gateway
- check that
clawreverseis inplugins.allow - check that
plugins.entries.clawreverse.enabledistrue
continue fails
- make sure
--promptis non-empty - if an agent id conflict occurs, retry with
--new-agent \x3Cfresh-id> - if you used
--log, inspect the returnedlogFilePath
rollback did not change files
That is expected unless --restore-workspace was used.
tree or checkpoints shows nothing
- confirm the agent id and session id are correct
- confirm the session has mutating tool calls that could create checkpoints
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install clawreverse-skill - 安装完成后,直接呼叫该 Skill 的名称或使用
/clawreverse-skill触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Clawreverse 是什么?
Inspect, checkpoint, rollback, and branch OpenClaw sessions with the ClawReverse plugin. Use when a user wants to recover from bad tool or file changes, rest... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 168 次。
如何安装 Clawreverse?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install clawreverse-skill」即可一键安装,无需额外配置。
Clawreverse 是免费的吗?
是的,Clawreverse 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Clawreverse 支持哪些平台?
Clawreverse 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Clawreverse?
由 BinHuangPJLAB(@binhuangpjlab)开发并维护,当前版本 v0.1.0。