Skip to content

[BUG] Edited message vanishes upon resending during pending tool approval, leading to empty API request and UI hang #11109

@wangqiang2512-lab

Description

@wangqiang2512-lab

Problem (one or two sentences)

After editing and resending an instruction while a tool call is pending, the new message completely disappears from the chat history. The system triggers an API request that never returns a result, and the UI remains stuck on the previous assistant response.

Context (who is affected and when)

This happens to any user who realizes they made a mistake in their instruction and tries to use the "Edit" button to fix it while Roo Code is in the middle of a task (specifically when waiting for the user to click "Approve/Reject" for a tool call). Instead of starting over with the new instruction, the user sees their updated message disappear and the interface get stuck on the old conversation state.

Reproduction steps

  1. Send a task that results in a tool approval request (e.g., "Read file X").
  2. While the "Approve/Reject" buttons are visible, click the Edit icon on your original prompt.
  3. Modify the text and click the "Resend" button.
  4. Observe: The edited message does NOT appear in the chat. The previous message's response remains as the last item.
  5. Observe: An "API Request..." spinner appears but eventually yields no response, leaving the task in a broken state.

Expected result

The chat history should update with the new edited message, the previous pending tool call should be cancelled, and the assistant should provide a new response based on the updated text.

Actual result

The edited instruction is lost (never rendered in chat). The API call is triggered with no context/content, and the UI stays frozen on the buttons/options of the prior response.

Variations tried (optional)

No response

App Version

v3.45.0

API Provider (optional)

None

Model Used (optional)

No response

Roo Code Task Links (optional)

No response

Relevant logs or errors (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions