A new openclaw/openclaw change makes that uncertainty part of the write contract. The tool can return whether content changed, whether a file was created, a generated diff and patch, and the first changed line. Review surfaces can use those details rather than reconstructing a story from the request alone.
Agent coding tools have made the diff their most reassuring object: a compact visual answer to “what did it do?” But a diff can mislead when the tool has not safely established what was in the file before the write.
The useful detail is what the contract refuses to say. The public write implementation declines to emit a partial patch when old or new content exceeds its byte or line budgets, when the edit distance is too costly to compute, when the old file is not usable UTF-8 text, or when pre-write state is unavailable.
In those cases it reports the narrower truth: a change happened, and sometimes whether the file was known to exist. That is less visually satisfying than a universal diff; it is more honest.
The preview belongs at the write boundary
The patch is generated where OpenClaw still has a chance to compare readable old and new text. The result travels as structured details, and the tool-call view gives that tool-provided diff priority.
If it only knows that a file changed, the view does not claim zero removals unless the details confirm that the file was created. This small design choice has a large consequence: the interface stops treating a prompt’s intended content as proof of the file’s prior state.
The accompanying tests make the boundary concrete. They expect a readable receipt for ordinary creates and overwrites, but expect no diff for binary files, giant rewrites, very large files, and unknown metadata. A missing patch is not treated as a failure to explain; it is the correct result when explanation would require guessing.
A review UI cannot repair a weak tool result
This is not a claim that OpenClaw has solved code review, or that its generated receipt is an independent audit trail. The sources show an implementation and controlled tests, not real-world review outcomes or every possible remote filesystem.
But the transferable rule is sturdy: carry evidence forward from the mutation boundary, label the limits of that evidence, and do not let the presentation layer invent the missing half. The next meaningful signal would be public end-to-end coverage across a remote backend or a review workflow that shows how users handle the deliberately patchless cases.