github / github/copilot-cli

Copilot stuck with non-api error

Aperta
#2,799 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
area:models area:networking
Lingua principale
Shell
Stelle
11.2k
Fork
1.9k
Merge medio
14h 16m
PR unite (30g)
6

Descrizione

### Describe the bug

Hey,
In quite a long prompt, I have encountered a copilot failing with logs:
```
2026-04-17T12:40:08.550Z [DEBUG] Sending telemetry event: copilot-cli/cli.telemetry (kind: session_usage_info)
2026-04-17T12:40:08.550Z [DEBUG] PremiumRequestProcessor: Setting X-Initiator to 'agent'
2026-04-17T12:40:08.551Z [INFO] --- Start of group: Sending request to the AI model ---
2026-04-17T12:40:08.562Z [DEBUG] Flushed 11 events to session 6de64bcd-80aa-446b-9a21-7bc9eb147ff7
2026-04-17T12:40:18.698Z [DEBUG] streaming request (Request-ID 00000-e2db69e9-b328-463f-a36c-30408cadaf71)
2026-04-17T12:40:36.491Z [DEBUG] [telemetry-queue] Flushing 15 events (51915 B → 3271 B gzipped)
2026-04-17T12:40:36.627Z [DEBUG] [telemetry-queue] POST failed: TypeError: fetch failed
2026-04-17T12:50:38.811Z [DEBUG] StreamingErrorRetryProcessor: Non-API error detected (retry 1): missing finish_reason for choice 0
2026-04-17T12:50:38.811Z [DEBUG] Retrying after 0.906466888767806 seconds (non-API error)...
2026-04-17T12:50:39.718Z [INFO] --- End of group ---
2026-04-17T12:50:39.812Z [INFO] CompactionProcessor: Utilization 20.9% (35047/168000 tokens) below threshold 80%
2026-04-17T12:50:39.978Z [DEBUG] Sending telemetry event: copilot-cli/cli.telemetry (kind: session_usage_info)
2026-04-17T12:50:39.978Z [DEBUG] PremiumRequestProcessor: Setting X-Initiator to 'agent'
2026-04-17T12:50:39.979Z [INFO] --- Start of group: Sending request to the AI model ---
2026-04-17T12:50:51.481Z [DEBUG] streaming request (Request-ID 00000-951d620d-b360-40d5-9338-eee4d49e15ce)
2026-04-17T12:51:06.753Z [DEBUG] [telemetry-queue] Flushing 1 events (3655 B → 1561 B gzipped)
2026-04-17T12:51:06.893Z [DEBUG] [telemetry-queue] POST failed: TypeError: fetch failed
2026-04-17T12:59:36.306Z [DEBUG] StreamingErrorRetryProcessor: Non-API error detected (retry 2): missing finish_reason for choice 0
2026-04-17T12:59:36.306Z [DEBUG] Retrying after 0.892253303896236 seconds (non-API error)...
2026-04-17T12:59:37.198Z [INFO] --- End of group ---
2026-04-17T12:59:37.297Z [INFO] CompactionProcessor: Utilization 20.9% (35047/168000 tokens) below threshold 80%
2026-04-17T12:59:37.463Z [DEBUG] Sending telemetry event: copilot-cli/cli.telemetry (kind: session_usage_info)
2026-04-17T12:59:37.463Z [DEBUG] PremiumRequestProcessor: Setting X-Initiator to 'agent'
2026-04-17T12:59:37.464Z [INFO] --- Start of group: Sending request to the AI model ---
2026-04-17T12:59:49.049Z [DEBUG] streaming request (Request-ID 00000-ad9b0a50-7898-421d-b4d1-5c3f179b38b1)
2026-04-17T13:00:06.963Z [DEBUG] [telemetry-queue] Flushing 1 events (3655 B → 1561 B gzipped)
2026-04-17T13:00:07.208Z [DEBUG] [telemetry-queue] POST failed: TypeError: fetch failed
```

### Affected version

1.0.31

### Steps to reproduce the behavior

No idea

### Expected behavior

copilot not crashing

### Additional context

node:24-slim container

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by reproducing the failure in the stated node:24-slim container with Copilot CLI 1.0.31, using a long prompt and the logs around StreamingErrorRetryProcessor. Trace the handling of the “missing finish_reason for choice 0” error and verify that the CLI no longer gets stuck or crashes; no source files or tests are identified in the issue.

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

Valutazione

Stack tecnologico
node.js, shell
Ambito
cli, devtools
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.