Skip to content

[Feature]: Add one-click "Revert/Discard Changes" for Coding Agent modifications #85

@XinhanWang

Description

@XinhanWang

Summary

A one-click UI button to instantly discard and revert all file modifications generated by a specific Coding Agent output.

Problem to solve

When iterating on complex experimental workflows or prototyping computer vision architectures, I heavily rely on the Dr. Claw Coding Agent to write and modify code. However, when the agent hallucinates, introduces bugs (such as incorrect tensor dimensions), or takes the logic in the wrong direction, manually untangling those changes completely breaks the development flow. Currently, resetting the workspace requires context-switching to the terminal to use Git commands (like git restore .), which disrupts the rapid trial-and-error process essential for AI research.

Proposed solution

A straightforward, one-click "Discard Changes" or "Undo" button located directly within the Dr. Claw UI, ideally attached to the Coding Agent's specific output or diff view. Triggering this should instantly revert all files modified during that specific agent interaction back to their exact prior state, safely rolling back the unwanted code.

Alternatives considered

Manual Undo: Using standard global IDE undo (Ctrl+Z / Cmd+Z), which is extremely error-prone and unreliable when the agent edits multiple files simultaneously.

Git Commands: Executing git restore . or git checkout in the terminal. This forces a context switch out of the Dr. Claw environment and risks losing other uncommitted, manual script adjustments I might want to keep.

Impact

Affected users/systems/channels: All Dr. Claw users relying on the Coding Agent for rapid code iteration and experimental prototyping (such as testing new computer vision architectures or tuning training scripts).
Severity: Blocks workflow / Highly annoying. It severely breaks the developer's "flow state" by forcing manual intervention to clean up unwanted code.
Frequency: Frequent. It occurs whenever the agent misunderstands a complex prompt, hallucinates incorrect logic, or modifies tensor dimensions incorrectly across multiple files.
Consequence: Causes significant delays, forces context-switching (e.g., dropping into the terminal to run git restore), and introduces a high risk of accidentally losing manual, uncommitted code while trying to untangle the agent's flawed edits.

Evidence/examples

No response

Additional information

Since Dr. Claw is designed as a comprehensive AI research IDE, users frequently prompt the agent with highly experimental tasks. Making it completely safe and effortless to "roll back" a failed agent experiment will significantly enhance the coding experience. It empowers users to attempt more ambitious prototyping without the constant fear of the agent corrupting the current working state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions