Skip to content

Session hangs after work appears complete; Escape recovery enters permanent "Cancelling" #2703

@d0d1

Description

@d0d1

Describe the bug

After a turn appears to finish its work, the CLI can hang in a busy/thinking state and never return to a usable prompt. The session is already stuck before any user intervention.

Pressing Escape to try to recover from that stuck state makes things worse: the UI transitions into a permanent Cancelling state. Once there, normal input and slash commands stop working entirely, and the only recovery is killing and restarting the process.

This report covers two compounding failures:

  1. Post-completion hang — the session does not return to the prompt after work appears complete
  2. Escape recovery failure — pressing Escape while stuck enters permanent Cancelling instead of recovering

Known observations

  • visible work appeared complete, but the CLI did not return to a normal ready prompt
  • after the session remained stuck for a while, pressing Escape moved the UI into Cancelling
  • once in that state, normal input and slash commands no longer worked
  • the session had to be restarted/killed to recover

Observed sequence

  1. Start an interactive Copilot CLI session.
  2. In at least one observed case, the session remained busy for a long time.
  3. The visible work appeared complete, but the CLI did not return to a normal ready prompt.
  4. After waiting and seeing no recovery, press Escape to try to recover or cancel the stuck state.
  5. The UI switches to Cancelling and does not recover.
  6. Normal input and slash commands no longer work.

Reproduction status: Intermittent. No minimal deterministic repro is known yet. The conditions that trigger the initial post-completion hang have not been isolated.

Expected behavior

When work is complete, the CLI should reliably return to a usable prompt instead of remaining stuck in a busy state.

If Escape is pressed after the session is already stuck, it should either:

  • cleanly recover or cancel, or
  • safely no-op while preserving input

It should not transition into a permanent Cancelling state that disables further interaction.

Affected version

GitHub Copilot CLI 1.0.25

Environment

  • OS: Linux

Potentially relevant context (not confirmed triggers)

  • observed in an interactive / non-autopilot session
  • the session may have involved background work or sub-agent activity, but that has not been isolated as the trigger
  • the primary failure appears to be the post-completion stuck state; the failed Escape recovery appears to be a secondary consequence

Related issues / lineage

Issues in this symptom family were closed as fixed through v1.0.21, but this was observed on v1.0.25. The exact relationship is still uncertain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions