Skip to content

[Bug] Cancel button does not always stop ongoing execution #864

Closed

Description

@akramcodez

Description

The Cancel/Stop button in the chat input does not always cancel the current execution.

Sometimes, after clicking the red stop button, Nanocoder continues executing the current request, tool calls, or pending operations instead of stopping completely.

Steps to Reproduce

  1. Start a request that triggers a longer agent execution or multiple tool calls.
  2. While the request is still running, click the red Stop/Cancel button.
  3. Observe the execution after cancellation.

Expected Behavior

Clicking the Cancel/Stop button should immediately stop the entire current execution, including:

  • Ongoing model generation
  • Pending tool calls
  • Subsequent tool calls queued by the agent
  • Any remaining execution loop for the current request

The UI should return to an idle state so the user can submit a new request.

Actual Behavior

The cancel button sometimes appears to be clicked successfully, but the current execution continues. Tool calls or other operations may continue running after cancellation.

In some cases, the UI also shows a warning such as:

"Nanocoder: Please approve or deny the pending tool before sending a..."

This can leave the user unable to properly stop the current request or immediately start a new one.

Logs/Screenshots

Image

Additional Context

Cancellation should be treated as a hard stop for the current user request. Once the user clicks Cancel, no new model generation or tool execution should continue for that request.

Activity

  1. added
    bug
    on Aug 12, 2026
  2. added a commit that references this issue on Aug 20, 2026
    f468315
  3. added a commit that references this issue on Aug 21, 2026
    4e11490
  4. added
    area:vscode
    on Oct 7, 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

    area:vscodebug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions