[PythonSDK] The send_and_wait function hangs and fails to return

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

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
48/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
github, python, typescript
Domínio
api, backend

Direção de pesquisa

Start at the Python SDK's send_and_wait implementation and inspect how it handles the session.idle event and on_event callbacks. Reproduce the reported hang using the supplied logs and check whether the idle event is missed or not sent. Done means send_and_wait returns when the session has finished, including this reported edge case.

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

Descrição

waiting on response

There is a very rare edge case where the send_and_wait function hangs and never returns. About once per two days.

The latest logs explicitly show an on_event callback with the following payload:

  • the assistant.message content is "Work completed, report saved to xxxx",
  • while assistant.reasoning is empty.

Based on these logs, it is highly likely that copilot-cli has already finished its task. However, the send_and_wait function remains stuck and does not return.

I suspect that the CLI either failed to send the session.idle event, or the event was lost for some reason.

"copilot_version": "1.0.96",
"copilot_sdk_version": "v1.0.19"
Linguagem predominante
Java
Estrelas
10.7k
Forks
1.5k
Métricas de merge de PRs
Nenhum PR com merge em 30d

Preparar o ambiente

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-sdk

Todas as issues de github/copilot-sdk

Issues semelhantes

Mais issues de Java

Receba novas issues na sua caixa de entrada

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