Skip to content

A serious bug occurs when using the /undo command. #6970

Open

Description

@luestr

Before you start

  • I searched existing issues and this is not a duplicate. 我已搜索过现有 issue。

What happened? 发生了什么?

When executing the /undo command, the TUI indicates that the file changes have been reverted, but the conversation content has not been undone. After multiple retries, I no longer know how many changes have actually been reverted.

Note /undo reverted workspace files to snapshot 'tool:d163e0b8-6551-45ae-8b18-c7edc71562be' (ed67db74)

Note Restored 3 file(s) to snapshot 'tool:d163e0b8-6551-45ae-8b18-c7edc71562be' (ed67db74):
▏    recreated dev/_lines.py
▏    recreated dev/_regen.py
▏    modified skills/lesson-plan-json/SKILL.md

Steps to reproduce 复现步骤

Execute the /undo command after the task is completed.

Codewhale version 版本

0.10.1

Where did it happen? 在哪里出现?

TUI (terminal interface)

Operating system 操作系统

Windows

How did you get Codewhale? 获取方式

Scoop / Nix / Docker / other package

Provider and model 提供商和模型

Deepseek-v4.1-flash

Terminal and shell 终端

Windows Terminal

codewhale doctor (optional)


Logs, screenshots, anything else (optional)

No response

Activity

  1. added
    needs-triageNew external report awaiting maintainer triage; repro, logs and version output help
    on Oct 13, 2026
  2. Hmbown commented on Oct 13, 2026

    @Hmbown
    Collaborator

    Thank you, @luestr — the exact tool:… snapshot output is especially useful: it identifies the 0.10.1 path that could restore one tool step without removing the whole request from the conversation. Repeated /undo calls becoming impossible to reason about is a real problem.

    The 0.10.2 candidate already changes /undo to take back a whole request, moving its files and conversation together (522d9dba0c). It also refuses a rollback when the request/snapshot identity is ambiguous (1bddf50a7e). I checked the source against v0.10.1 and ran the existing related checks on macOS: 38 passed, 0 failed, including whole-request undo and conversation/file alignment. The current candidate is #6968; 0.10.2 is not released, and I have not yet reproduced your exact session on Windows. Native Windows verification is in progress, so this issue stays open.

    For the affected workspace, please save a copy of its current state before attempting more rollback. The candidate changes future undo behavior; it cannot infer which earlier retries you intended. Once a verified candidate is available, a check using a small disposable request on your Windows Terminal setup would help confirm this report.

  3. Hmbown commented on Oct 13, 2026

    @Hmbown
    Collaborator

    Windows follow-up for @luestr: I have now exercised the 0.10.2 candidate (cf7199b52e) in our Windows 11 ARM64 VM, using Windows Terminal and ordinary Ask mode. A controlled request performed three actual file writes (two replacements and one new file). One /undo restored both original files byte-for-byte, removed the new file, and removed the matching request/reply from the conversation. The corrected fixture reported exactly three paths reversed.

    This verifies the whole-request behavior carried by 522d9dba0c and 1bddf50a7e in an unreleased native debug candidate. It does not reproduce your exact session or qualify the packaged release. Thank you for separating the file rollback from the conversation mismatch—that gave us both outcomes to check. We will keep this open for your candidate/release confirmation.

  4. luestr commented on Oct 13, 2026

    @luestr
    Author

    @Hmbown Could the conversation rollback be made more flexible? For example, allow users to roll back C, D, and E messages and file changes all at once from the position of message C?

    A
    B
    C
    D
    E
    

    Additionally, when there are many operations to roll back, the TUI provides no indication that a rollback is in progress, and it becomes somewhat laggy.

    I think all user interactions should be blocked while a rollback is in progress.

  5. Hmbown commented on Oct 15, 2026

    @Hmbown
    Collaborator

    @luestr Your C→E example needs a selected range of requests to roll back both files and conversation together. The current 0.10.2 candidate handles one whole request; conversation backtracking does not provide that multi-request file rollback.

    I also checked the progress concern: the current undo command performs synchronous Git work and can wait for a pending snapshot before rendering its result, so the TUI has no useful rollback-in-progress state. A responsive busy state that prevents conflicting edits is still missing. The earlier Windows receipt verifies one-request file/conversation alignment, not either of these follow-up behaviors. Both remain open in this report; 0.10.2 is still unreleased.

    — Written by GPT-6 (AI agent) on behalf of the maintainers.

  6. removed
    needs-triageNew external report awaiting maintainer triage; repro, logs and version output help
    on Oct 17, 2026
  7. added this to the v0.10.3 milestone on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwindowsWindows-specific behaviour

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions