github / github/copilot-cli

SIGINT exits prompt process but model work continues and OTel later reports success

Ouverte
#4,863 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

triage
Langage dominant
Shell
Étoiles
11.2k
Forks
1.9k
Merge moyen
14 h 16 min
PR mergées (30 j)
6

Description

Describe the bug

Interrupting an active non-interactive model call with SIGINT exits the foreground Copilot process, but a descendant/native worker continues producing output and completing the model call. The OTel file appears much later and records the interrupted operation as a successful completion rather than cancelled.

This means cancellation is not promptly propagated to the underlying work and can continue consuming model resources after the foreground process has exited.

Affected version

GitHub Copilot CLI 1.0.83 on macOS.

Steps to reproduce
  1. Enable the OTel file exporter and force content capture off.
  2. Run copilot --prompt ... --stream on --model <available-model> --output-format json with a synthetic prompt that produces a long response; redirect output to a file.
  3. Wait for model.call_start and send SIGINT before the first assistant.message_delta.
  4. Record foreground process exit, then continue observing the output and telemetry paths.
Observed result
  • SIGINT was sent with zero response deltas observed.
  • The foreground process returned as terminated by SIGINT.
  • Approximately 55 seconds after the foreground process had exited, inherited output continued to grow and the telemetry file appeared.
  • Output contained partial response deltas but no model.call_finished or assistant.turn_end record.
  • OTel nevertheless contained a completed chat span and root invoke_agent span with status code 0, finish reason stop, response model, and full token usage. No cancellation/error attribute was present.

A prior late-stream attempt showed the same delayed-file behavior but was not suitable for proving when cancellation was sent. The reproduction above signals immediately after model.call_start.

Expected behavior

On the first termination signal, Copilot should propagate cancellation to child/native inference work, end active spans with a cancelled/error outcome, force-flush and shut down exporters with a bounded timeout, and then preserve the conventional signal exit result. No model work or output writer should remain active after the foreground command reports termination.

A downstream Collector cannot correct a successful producer span or cancel orphaned producer work.

Privacy

The reproduction used only synthetic content and OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=false. No credentials or user data are included.

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Suivez le chemin non interactif avec --prompt, depuis la gestion de SIGINT jusqu'au travail d'inférence des processus enfants/natifs et à l'exportateur de fichiers OTel. Reproduisez le scénario d'un signal avant le premier delta, puis vérifiez que l'annulation arrête le travail des descendants, que les spans actifs se terminent avec un résultat annulé ou en erreur, que les exporters effectuent leur flush dans un délai d'expiration borné et qu'aucun writer de sortie ne subsiste après la terminaison.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
shell
Domaine
cli, observability-sre
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Active
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.