Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Cancelling/closing an ask_user form silently discards all previously answered fields

Aberta
#4,945 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
65/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
shell

Direção de pesquisa

Look for the ask_user/elicitation tool implementation in the codebase, likely in a directory like src/ or lib/. Find where form cancellation is handled and where field answers are stored. Examine the flow that returns 'User cancelled the request' and see if partial answers can be captured. Check for UI components that manage form state. Testing involves running the CLI and triggering a multi-field form to verify the bug and any fix.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

area:tools

Describe the bug
When a multi-field form (via the ask_user/elicitation tool) is cancelled or closed (e.g. via Esc, see related issue about Esc behavior), any fields the user had already answered before cancelling are discarded entirely. The tool result returned to the agent is just a generic cancellation notice with no partial data — even though the user may have already provided a real, considered answer to an earlier question in the same form.

Expected behavior
If a user has answered one or more fields before a form is exited/cancelled, those partial answers should either be (a) preserved and returned to the calling agent so context isn't lost, or (b) the UI should clearly warn the user before discarding a partially-completed form, distinguishing 'cancel with no answers yet' from 'cancel after already answering something.'

Additional context
In a real session, a user answered the first question of a multi-field form, then the form was closed (likely via Esc). The tool call result contained only "User cancelled the request" with no indication that a field had been answered, and no way to recover it. The agent could not tell the user what had been captured (nothing) or distinguish intentional full-cancellation from an accidental exit after partial input.

Linguagem predominante
Shell
Estrelas
11.2k
Forks
1.9k
Merge médio
14h 16min
PRs com merge (30d)
6

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de github/copilot-cli

Todas as issues de github/copilot-cli

Issues semelhantes

Mais issues de Shell/Bash

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.