github / github/copilot-cli

Background subagent start events deferred until parent task completes (1.0.83)

オープン
#4,760 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

area:agents
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

Observed behavior

On macOS arm64 with the installed @github/copilot 1.0.83 runtime, two background task calls returned handles immediately, but matching subagent.started events did not appear until approximately 14 minutes later, immediately after the parent called task_complete. The parent continued using tools during that interval.

Sanitized relative timeline

Times are relative to the first background task request; task-call IDs were correlated locally and are omitted here.

  • T+0.000s / +0.001s: two task requests with mode=background.
  • Handles returned within 11ms; subsequent read_agent responses reported running and zero completed turns.
  • T+303.291s: two separately scoped synchronous task requests. Matching subagent.started events appeared within 23ms.
  • T+570.272s: write_agent stop instructions sent to the background tasks; messages were queued, not cancellation.
  • T+852.718s: parent task_complete called.
  • T+852.793s / +852.795s: matching subagent.started events for the original background requests.
  • First local work markers followed approximately 6s and 11s later. Both background tasks completed their original work, then processed the queued stop instructions.
Expected behavior

Background tasks should begin independently while the parent performs unrelated work, or expose a queued/deferred state rather than imply active execution. If parent-turn completion is a prerequisite, document and surface that constraint.

Reproduction outline (not yet reduced to a deterministic repro)

Launch two small background tasks that record a first-work timestamp; continue unrelated parent tool work; compare task submission, subagent.started, first-work marker and parent completion events. In the observed session both start events aligned within 77ms of parent completion.

Limits

This is event-level evidence of deferred dispatch, not proof of a particular scheduler defect. No dispatcher source was examined. Background and synchronous comparisons used different models, so they do not isolate model versus execution-mode effects. The background completion duration included the pre-start interval. No raw transcripts, source code, credentials or environment files are attached.

Potentially related lifecycle discussion: #4101, although that report concerns write_agent blocking rather than initial background task dispatch.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

再現手順の概要から始め、バックグラウンドタスクについて task submission、subagent.started、first-work、parent completion events を比較します。次に、timeline と同期タスクとの比較をコンテキストとして使用し、dispatcher または lifecycle の経路を調査します。バックグラウンド処理が独立して開始されるか、その遅延状態と parent completion の制約が明確に示されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
github
領域
cli
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。