Skip to content

AI chat: no way to stop a long agent turn #1260

Closed

Description

@EtienneLescot

Problem

An AI chat turn cannot be stopped. In the v2.1.0-rc.1 Windows pass, Smart cuts ran for 3.5 minutes with no way to end it except waiting. The composer stays busy until the provider is done.

What is missing

There is no cancel path anywhere on the product path:

  • invokeOpenScreenAgent (electron/ai-edition/deep-agent/service.ts) passes no signal to streamEvents, and its own comment notes there is still no AbortSignal or timeout.
  • The native bridge has no "cancel chat run" action, so the renderer cannot ask for one.
  • The chat composer has no stop control.

To decide before building it

What a stop does to the edits the turn already made: keep them (apply the document so far, one undo unit like any turn) or drop them. Keeping them matches what the user has already seen streamed as applied.

Scope

An AbortController per run in the main process, a bridge action to abort it, a stop button in the composer while busy, and its label in the 15 locales.

Activity

  1. EtienneLescot commented on Oct 21, 2026

    @EtienneLescot
    MemberAuthor

    Thanks for raising this. Direction: a Stop button ends the agent's turn and keeps the edits it has already applied, like coding agents such as Claude Code do. Each edit is already in the undo history, so Ctrl+Z takes you back step by step. A PR implementing that is welcome.

  2. auberginewly commented on Oct 22, 2026

    @auberginewly
    Contributor

    I would like to take this on. I will add a Stop control to the chat composer and wire cancellation through the bridge to the active agent run, following your direction: keep edits already applied and preserve their existing undo history. I will also check cancellation races, cleanup, and starting another turn after stopping, with regression tests and localized UI text. I will open a focused PR once implementation and validation are ready.

  3. added
    status: fixed in mainWork is merged into main but may not be in a downloadable release yet.
    status: pending releaseMerged change is waiting for a packaged desktop release.
    on Oct 24, 2026
  4. added this to the Next Release milestone on Oct 24, 2026
  5. github-actions commented on Oct 24, 2026

    @github-actions
    Contributor

    Fixed by #1368 and merged into main.

    This change is assigned to the Next Release release milestone and is not necessarily available in the latest downloadable desktop release yet. It is currently marked as status: pending release until a packaged release containing it is published.

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

    enhancementNew feature or requeststatus: fixed in mainWork is merged into main but may not be in a downloadable release yet.status: pending releaseMerged change is waiting for a packaged desktop release.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions