[PythonSDK] The send_and_wait function hangs and fails to return

Aperta
#2,853 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
github, python, typescript
Ambito
api, backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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"
Lingua principale
Java
Stelle
10.7k
Fork
1.5k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github/copilot-sdk

Tutte le issue di github/copilot-sdk

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.