Skip to content

Stashed (ctrl+S) prompt discarded on session switch - pop restores nothing #4334

Description

@Ghost93

Describe the bug

A prompt typed but not yet submitted, then stashed with ctrl+s, is lost after switching sessions. On returning to the original session, pressing ctrl+s (pop) restores nothing - the input stays empty and the stashed text is gone.

Affected version

 GitHub Copilot CLI 1.0.78-2

Steps to reproduce the behavior

  1. In a session, type STASH_TEST_123 - do not press Enter.
  2. Press ctrl+s to stash (input clears).
  3. Switch to another session via the Sessions sidebar (or /resume).
  4. Switch back to the original session.
  5. Press ctrl+s again to pop. → Nothing appears; the input is empty.

Expected behavior

Returning to the original session should preserve its stashed prompt, so ctrl+s (pop) restores STASH_TEST_123. The stash should be scoped to, and survive with, the session it was created in.

Additional context

  • Reproduced deterministically on 1.0.78-2 (100% of attempts)
  • 1.0.76-3  shipped a fix in this exact area: Unsent prompt text now stays with the session it was typed for (for the rest of the CLI session) instead of following you to the session you switch to . I'm on 1.0.78-2 (after that fix), yet the  ctrl+s-stashed prompt is still lost on session switch - so either the explicit ctrl+s stash slot isn't covered by that fix, or it has regressed.
  • Related issue: High priority: bare left/right arrow hijacks cursor key for session navigation, discarding in-progress input (data loss) #4147 (session-navigation input loss / auto-stash discussion).
  • Environment: WSL2 (Ubuntu), x86_64, zsh, Windows Terminal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:input-keyboardKeyboard shortcuts, keybindings, copy/paste, clipboard, mouse, and text inputarea:sessionsSession management, resume, history, session picker, and session state

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions