Apply button disappears in worktree mode

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

In worktree, the Apply and Undo Apply buttons only work for the first agent reply that generates the actual code changes and disappear in the subsequent agent replies.

Steps to Reproduce

  1. Prompt the agent to edit files in the worktree mode.
  2. The Apply button appears after the first agent reply that generates the actual code changes.
  3. This button is no longer present in subsequent agent responses.

Expected Behavior

The Apply and Undo Apply buttons should be present throughout the chat session, and they should apply and discard cumulative code changes made in the worktree.

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Version: 2.4.28 (Universal)
VSCode Version: 1.105.1
Commit: f3f5cec40024283013878b50c4f9be4002e0b580
Date: 2026-02-03T00:56:18.293Z
Build Type: Stable
Release Track: Default
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Darwin arm64 25.2.0

For AI issues: which model did you use?

Claude Opus 4.5
GPT 5.2 Codex Extra High

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. This is a known issue in worktree mode. After the first Apply, the button disappears in the agent’s later replies.

Related threads:

One possible workaround: sometimes, if you ask the agent to do something small, the buttons come back. Let me know if that helps, or if you notice any other patterns.

I remember I saw the buttons came back, but the Apply buttons only applied changes made in that latest agent reply. This is why I mentioned in this bug report that Apply and Undo Apply should apply and discard cumulative changes made in the worktree. Without the ability to apply and drop cumulative changes, it’s very cumbersome to switch between different worktrees, which, in my case, refer to the GPT 5.2 Codex and Opus 4.5 sessions.

1 Like