Checked other resources
Area (Required)
Feature description
After the agent makes file edits, there's no quick way to review what changed or revert a bad edit without scrolling through the conversation, running git diff manually, or manually fixing the file.
Two small slash commands would help:
-
/diff — Show all file changes made by the agent in the current session. Unlike git diff, this only shows agent changes (not manual edits), which is useful when both are mixed. Also works in non-git environments like remote sandboxes.
-
/undo — Revert the last file edit made by the agent. Validates that the edited text is still present and unique before reverting, so it's safe even if the file was modified after the edit.
Inspired by using Claude Code, which surfaces file changes for easy review. Having the same in Deep Agents CLI would help with trust and transparency.
Proposed solution (optional)
/diff:
- Extracts all successful
edit_file and write_file tool calls from the current thread's messages
- Generates unified diffs using the existing
DiffMessage widget and compose_diff_lines rendering
- Shows a summary line (e.g. "3 files changed: 2 edits, 1 new file")
- Filters out failed operations
/undo:
- Finds the last successful
edit_file tool call from the conversation
- Reverses the edit by swapping
old_string and new_string on the filesystem
- Validates the text is still present and unique before reverting
- Shows the reverse diff after reverting
- New file creation (
write_file) cannot be undone since the backend has no delete API — communicates this clearly
Both commands are CLI-only (libs/cli/), no SDK changes needed. Reuses existing DiffMessage widget. I have a working implementation with unit tests ready to go.
Additional context (optional)

Checked other resources
Area (Required)
Feature description
After the agent makes file edits, there's no quick way to review what changed or revert a bad edit without scrolling through the conversation, running
git diffmanually, or manually fixing the file.Two small slash commands would help:
/diff— Show all file changes made by the agent in the current session. Unlikegit diff, this only shows agent changes (not manual edits), which is useful when both are mixed. Also works in non-git environments like remote sandboxes./undo— Revert the last file edit made by the agent. Validates that the edited text is still present and unique before reverting, so it's safe even if the file was modified after the edit.Inspired by using Claude Code, which surfaces file changes for easy review. Having the same in Deep Agents CLI would help with trust and transparency.
Proposed solution (optional)
/diff:edit_fileandwrite_filetool calls from the current thread's messagesDiffMessagewidget andcompose_diff_linesrendering/undo:edit_filetool call from the conversationold_stringandnew_stringon the filesystemwrite_file) cannot be undone since the backend has no delete API — communicates this clearlyBoth commands are CLI-only (
libs/cli/), no SDK changes needed. Reuses existingDiffMessagewidget. I have a working implementation with unit tests ready to go.Additional context (optional)