Codewhale documentation
ReleaseLatest release v0.10.0 · Sep 22, 2026These pages describe v0.10.0, the published release.Changelog →

Review what changed

Codewhale shows you each edit as it happens and keeps a snapshot of your workspace before and after every turn. Use this page to check what changed, put files back, and get a second opinion before you push.

See the changes

Every file edit appears in the transcript as a diff when it is made. To see everything at once, run:

/diff

/diff shows all changes since this session started. Your own git history is untouched, so git diff and git status work as usual.

Roll files back to an earlier turn

Before and after each turn, Codewhale snapshots the workspace into a separate git store. It never writes to your repository's own .git, and it works in folders that are not git repositories.

/restore           # list the 20 most recent snapshots
/restore list 50   # list more (up to 100)
/restore 1         # put files back to the newest snapshot

Restoring changes files, so it needs a trusted workspace (/trust on) or Full Access; anyone can list snapshots. You can also just ask — “undo your last edit” — and Codewhale can roll back its own turn.

/undo is different: it removes the last exchange from the conversation. Use /restore when you want files back.

Note: Snapshots are kept for 7 days. A workspace larger than 2 GB skips snapshots and Codewhale tells you once; raise [snapshots] max_workspace_gb in config if you want them anyway. If git is missing or the disk is full, the turn still runs without a snapshot.

Get a code review

Inside a session, /review runs a structured review of a file, a diff, or a pull request. From the shell, codewhale review reviews a git diff and prints findings:

codewhale review                      # unstaged changes in the working tree
codewhale review --staged             # what you are about to commit
codewhale review --base origin/main   # everything on this branch
codewhale review --pr 123             # a GitHub pull request (needs gh)

Add --path <file> to review one path, --model to pick the reviewer, or --json for machine-readable output. A diff over 200,000 characters is refused rather than cut short; raise the limit with --max-chars.

Note: --post publishes the review as a comment on the pull request. Without it, nothing leaves your terminal except the model request.

Keep a receipt of the review

A review receipt records what was reviewed and what the review found, so you can prove the diff you push is the diff that was reviewed.

codewhale review --base origin/main --write-receipt
codewhale review --base origin/main --check-receipt
  • --write-receipt saves a local JSON file after a successful review: a fingerprint of the diff, the provider and model, finding counts, unresolved risk, and a hash of the review text. It does not store the diff itself.
  • --check-receipt makes no model call. It exits non-zero if the diff has changed since the receipt, if the review left unresolved risk, or if an attached check did not pass — so it works as a pre-push gate.
  • --receipt-path <file> writes or reads a specific receipt instead of the latest one.

Note: Receipts cover code reviews today. A receipt for an ordinary agent turn — every tool call, approval, and file change in one export — is designed but not built yet.

Save the whole session

To keep or share the full record of a session, export it:

/export clipboard                  # a redacted copy of this session
/export file notes/session.md      # the same, written to a file
codewhale sessions export <id>     # full archive: messages, tool calls, results, artifacts

codewhale sessions lists saved sessions and their ids. The archive holds the complete context, so treat it like source code.

Next

Set modes and approvals

Choose whether Codewhale asks before it edits or runs anything.

Run a workflow

Repeatable, multi-step work with a record of every run.

Fix a problem

What to do when a turn stalls, a key fails, or a session will not resume.