Skip to content

Edit queued prompts in-place before they execute #1782

@berrat

Description

@berrat

Describe the feature or problem you'd like to solve

Once a prompt is queued it is immutable. If you realise a queued prompt needs a correction — a missing detail, a wrong file path, a scope change — your only option is to remove it and re-type it from scratch. There is no way to open and edit an already-queued entry.

Related: #1683 (reorder), and the companion remove issue (#1781) — this is specifically about in-place editing of queued prompts.

Proposed solution

From the interactive queue manager (or via the same Ctrl+Q / /queue entry point), add an edit action on any queued item:

  • e or F2 on a selected queue entry opens it for editing — either:
    • Inline: the prompt text becomes an editable field in the TUI, same as the main input bar, with full cursor navigation
    • External editor: respects the $EDITOR environment variable (same as Ctrl+G in the main prompt bar)
  • On Save / Enter: show a one-step confirmation diff:
    Update queued prompt?
    Before: "Refactor the auth module"
    After:  "Refactor the auth module and add JSDoc comments"
    Confirm? (Y/n)
    
  • On Escape: discard edits, return to queue list unchanged.

The confirmation diff view is important — it makes it impossible to accidentally overwrite a queued prompt without seeing exactly what changed.

Example prompts or workflows

  1. User queues "Fix the login bug in auth.ts" then realises the file is auth.service.ts. Opens queue manager, edits the entry, confirms — no re-typing needed.
  2. User queues a vague prompt. While the current agent is running, user refines the queued prompt with more context before it executes.
  3. User has $EDITOR set to VS Code or Neovim — pressing e on a queue entry opens it there, same as Ctrl+G works for the live input bar.
  4. User accidentally presses e, makes unwanted changes, hits Escape — original prompt is fully preserved.

Additional context

  • OS: Windows 11 Pro (Build 26200 / 24H2)
  • Shell: PowerShell 7.5.4
  • Copilot CLI: 0.0.420 (win32-x64)
  • The $EDITOR environment variable and Ctrl+G shortcut (added in 0.0.419) already support external editing for the live input bar — queue editing should respect the same behaviour for consistency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions