Repository navigation
Description
Describe the bug
When the Copilot CLI /tasks overlay is open and the agent asks a question, pressing Esc to close the task/subagent menu also affects the underlying question prompt.
The same Esc keypress appears to be handled twice:
- It closes the
/tasksoverlay. - It also dismisses or skips the active question prompt underneath.
This prevents the user from answering the question and can cause the agent to continue with an unintended skipped/default response.
This seems inconsistent with the documented Esc behavior for Copilot CLI, where an open dialog, overlay, or picker should be closed before Esc acts as a broader cancel action.
References:
Affected version
GitHub Copilot CLI 1.0.49.
Steps to reproduce the behavior
- Start an interactive Copilot CLI session.
- Start a task that uses subagents or background tasks.
- Open the task/subagent manager with
/tasks. - While the
/tasksoverlay is open, wait for the agent to ask a question or clarification. - Press
Esconce, intending only to close the/tasksoverlay. - Observe that the active question is also skipped or dismissed.
Expected behavior
Pressing Esc while the /tasks overlay is open should only close that overlay and return focus to the active question prompt.
The question should remain visible and answerable.
Additional context
This looks like a key handling or focus propagation issue. The /tasks overlay appears not to consume the Esc event after using it to close itself, so the same keypress reaches the global cancel handler or the underlying question UI.
A possible fix would be to make the /tasks overlay treat Esc as handled when it closes the overlay, preventing the key event from being forwarded to lower-priority UI layers.
A regression test could cover this stacked UI case:
- An active question prompt is visible underneath the
/tasksoverlay. - The user presses
Esconce. - Only the
/tasksoverlay closes. - The question prompt remains open and answerable.
Activity
primetimetank21 commentedon Jul 13, 2026
I'd love to contribute towards a fix on this, but there doesn't appear to be any way to contribute 😕
It's still present as of version 1.0.70