Background subagent start events deferred until parent task completes (1.0.83)
还没有人认领这个 Issue。
- 主要语言
- Shell
- 星标
- 11.2k
- 派生
- 1.9k
- 平均合并
- 14 小时 16 分钟
- 30 天内合并 PR
- 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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从复现大纲开始,比较后台任务的 task submission、subagent.started、first-work 和 parent completion events。然后调查 dispatcher 或 lifecycle 路径,并以 timeline 和同步任务对比作为上下文。后台工作能够独立启动,或其延迟状态及 parent completion 约束得到清晰呈现,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- github
- 领域
- cli
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100