github / github/copilot-cli

system_notification fires before background agent has completed

Aberta
#3,417 0 comentários 0 reações 0 responsáveis Ver no GitHub
area:agents
Linguagem predominante
Shell
Estrelas
11.2k
Forks
1.9k
Merge médio
14h 16min
PRs com merge (30d)
6

Descrição

### Describe the bug

When two or more background agents are launched simultaneously (parallel tool calls in a single orchestrator turn), system_notification fires before the agent has actually started or long before the task is complete.

If the orchestrator trusts system_notification alone and immediately reads output files, it will find them missing and may misinterpret this as agent failure, triggering unnecessary reruns.

**Workaround:** Do not trust system_notification alone. Upon receipt, call read_agent and verify status: completed before acting on results

### Affected version

GitHub Copilot CLI 1.0.49

### Steps to reproduce the behavior

1. Capture a baseline timestamp (T0) immediately before launching agents.
2. In a single orchestrator response, launch two general-purpose background agents in parallel:
- Alpha: records START timestamp → sleep 120 → records END → writes /tmp/test_alpha.txt → records FILE_WRITTEN
- Beta: same flow with sleep 90, writes /tmp/test_beta.txt
3. On each system_notification, immediately record T_notify and check whether the output file exists.
4. Continue polling until the files actually appear, then compare timestamps.

### Expected behavior

system_notification arrives after the agent has finished its task and written its output (T_notify ≥ T_written).

### Actual behavior

system_notification fires before the agent has actually started or long before the task is complete.

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Start by running the parallel-agent reproduction described in the issue, recording T0, notification times, and file-write times. Trace the system_notification and read_agent entry points to determine why notifications precede agent completion. Done means notifications arrive after the output files are written, with the behavior covered by a regression test.

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

Avaliação

Stack de tecnologia
github, shell
Domínio
cli
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Pouca atividade
Clareza
Claramente especificada
Facilidade para iniciantes
55/100

Receba novas issues na sua caixa de entrada

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