Skip to content

True non-blocking message queue for autopilot/multi-turn agent sessions #2025

@X-Zero-L

Description

@X-Zero-L

Describe the feature or problem you'd like to solve

Currently, the message queue mechanism (introduced in v0.0.380 via Ctrl+D) operates at the per-LLM-call level: queued messages are injected into the next model turn rather than the current one. While this is an improvement over immediate interruption (Enter), it still disrupts the natural flow of a multi-turn autopilot session. In autopilot scenarios — where the agent autonomously chains multiple turns to complete a long-horizon task (e.g., refactoring a codebase, migrating a project) — any injected message, whether via Enter or Ctrl+D, effectively interrupts the task chain. There is currently no way to append a message that will only be delivered after the entire autonomous task session completes.

Proposed solution

Introduce a session-level message queue mode, distinct from the existing per-turn queue. The behavior would be:

  • A new keyboard shortcut (e.g., Ctrl+Shift+D or a slash command like /queue) lets users submit messages that are held until the agent reaches a natural stopping point (i.e., no more autonomous tool calls are pending).
  • Queued messages are visually indicated in the UI (e.g., "1 message queued, will be delivered after task completes").
  • Users can optionally cancel queued messages before delivery (already tracked in issue Allow users to cancel or remove enqueued messages before they are executed #1857).

This is a purely additive change — existing Enter (steer) and Ctrl+D (next-turn queue) behaviors remain unchanged.

How will it benefit GitHub Copilot CLI and its users?

  • Enables true "fire-and-forget" instruction appending during long autonomous tasks without risking derailment mid-execution.
  • Reduces cognitive overhead: users can think ahead and queue follow-up instructions without having to watch the screen and time their input precisely.
  • Aligns Copilot CLI's UX with how developers actually think during long agentic workflows.
  • Enables true "fire-and-forget" instruction appending during long autonomous tasks without risking derailment mid-execution.
  • Reduces cognitive overhead: users can think ahead and queue follow-up instructions without having to watch the screen and time their input precisely.
  • Aligns Copilot CLI's UX with how developers actually think during long agentic workflows.

Example prompts or workflows

  1. Codebase migration: User starts a task migrate this project from JavaScript to TypeScript. While the agent is working, the user types /queue Also make sure to update all import paths and tsconfig.json — this is delivered only after the migration is fully done, not mid-execution.
  2. Batch refactoring: User kicks off refactor all components to use the new design system. Mid-run, they realize they want to add Also add unit tests for each refactored component — queued for after the refactor completes.
  3. CI pipeline debugging: Agent is running a multi-step debug task. User appends After fixing, run the test suite and summarize failures without interrupting the current diagnostic loop.
  4. Code review + fix loop: Agent is autonomously reviewing and applying fixes. User pre-queues Once done, generate a CHANGELOG entry for all changes made.
  5. Large file generation: Agent is scaffolding a new service. User queues Also create a README for the new service to be appended after scaffolding is complete.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:agentsSub-agents, fleet, autopilot, plan mode, background agents, and custom agents
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions