| BG01 |
普通会话,模型调用 Agent(run_in_background=true) |
子 agent delayed completion |
父 turn 先回 idle;idle wake notification request 含 <task-notification> 和子结果;UI 不显示 notification user 气泡 |
UI + provider capture + runtime status |
covered by conversation-session-background.test.ts |
| BG02 |
普通会话,模型调用 Bash(run_in_background=true) |
Bash 进程完成 |
Bash tool block 可见;completion 赶上 active loop 时 notification 合进后续 provider request,否则 idle wake;foreground progress 不把完成 tool block 重新标 running |
UI + provider capture |
covered by conversation-session-background.test.ts |
| BG03 |
/goal continuation 中调用 background Agent |
子 agent 完成前 goal loop 准备 verifier |
verifier request index 必须晚于 notification request;最终 target complete |
provider capture + UI target status |
covered by conversation-session-background.test.ts |
| BG04 |
background notification 在 active tool loop 仍有后续 roundtrip 时入队 |
runtime command queue priority intake |
同 session 不并发模型请求;已有 active query 的后续 roundtrip 前按 priority 消费 notification,E2E 断言同一次 provider request 同时包含上一轮 Bash tool result 和 <task-notification>;idle 时作为 task-notification command 串行唤醒 |
core runtime tests + BG provider capture |
covered by conversation-session-background.test.ts and runtime-tool-loop.test.ts |
| BG05 |
notification 已写入 session store |
UI 刷新/投影 |
model-only synthetic input 不出现在可见 user messages,也不参与标题 |
shared/UI unit tests + BG DOM assertion |
covered |
| BG06 |
background subagent 内启动 background Bash;subagent 首轮 child turn 已完成 |
子 Bash 完成或超时 |
parent 只收到一次 Agent completion notification;child Bash terminal 不再触发 child provider request;child registry/event/artifact terminal cleanup 完成;UI 不出现 parent fake-running |
core runtime tests + replay E2E parent surface |
covered by conversation-session-background.test.ts |
| BG07 |
普通会话,父模型先调用 Agent(run_in_background=true),子 agent 正在执行本地 Bash tool;core 相邻代表覆盖 child model step 正常 text-only 收口 |
父模型在 Agent launch tool result 后调用 SendMessage |
SendMessage tool result 为 delivered;完整 Bash tool batch 后或正常 text-only assistant 后,子 agent 下一次 provider request 都含 user-role Message from coordinator 和 message payload;不得降级成未唤醒的 future queue;最终父 notification 消费子结果 |
provider capture + UI tool block + core runtime test |
covered by conversation-session-background.test.ts + subagent-explore.test.ts |
| BG08 |
普通会话,模型调用长时间 Bash(run_in_background=true) |
用户在统一 background control UI 点击 stop |
Bash stop 经 session/cancelBackgroundTask 进入 runtime dispatcher;provider request 含 stopped/killed <task-notification>;UI running row 消失;notification 不重复 |
UI control + provider capture + runtime tests |
covered by conversation-session-background.test.ts |
| BG09 |
普通会话,模型调用长时间 Agent(run_in_background=true) |
用户在统一 background control UI 点击 stop |
local_agent stop 经同一 dispatcher;child runtime abort;provider request 含 stopped <task-notification>;UI running row 消失;main 回 idle |
UI control + provider capture + runtime tests |
covered by conversation-session-background.test.ts |
| BG10 |
普通会话,模型调用 Agent(run_in_background=true) 后继续调用 TaskStop |
TaskStop 停止 running local_agent task |
provider-visible TaskStop tool call/result 使用 task id;stopped notification 通过 runtime command queue 消费;不新增第二套 kill/notification path |
provider capture + runtime tests |
covered by conversation-session-background.test.ts |
| BG11 |
普通会话,模型调用 eligible foreground Bash 且设置短 timeout |
Bash timeout 先于命令完成 |
foreground Bash timeout auto-background;tool result 返回 backgrounded;统一 background control UI 出现该 Bash task;完成后 notification 进入 provider request |
UI control + provider capture + runtime tests |
covered by conversation-session-background.test.ts |
| BG12 |
普通会话,统一 background control UI 已显示 running Bash task |
Bash background task 自然完成 |
UI control row 在 completed notification 后消失;不残留 running row、不需要刷新、不重复展示 |
UI control + provider capture + UI tests |
covered by conversation-session-background.test.ts |
| BG13 |
普通会话,模型分别调用 foreground Agent 和 Agent(run_in_background=true) |
child Agent 执行一个 Bash tool 并向父 UI mirror tool update |
foreground child tool update 期间 main chat root 保持 streaming 且底部 chat-loading 出现;background Agent control 仍显示 running,renderer store 收到 mirrored child Bash toolCall,但 main chat root 不进入 streaming、底部 chat-loading 不出现;Agent 完成后仍按标准 <task-notification> 收口 |
UI DOM/store + provider capture + UI tests |
covered by conversation-session-background.test.ts |
| BG14 |
普通会话,模型调用普通 foreground 长时间 Bash,且命令在 timeout 前完成 |
Bash tool running |
main chat root 保持 streaming;底部 chat-loading 出现;命令完成后 provider continuation 收口,main 回 idle;不触发 background control row |
UI DOM/store + provider capture |
covered by conversation-session-background.test.ts |
| BG15 |
普通会话,background Bash 仍 running,但 main turn 已 idle |
用户主动发送普通文本 |
该文本立即成为新的 provider request;发送后 queueCount 保持 0;background task control row 仍可单独 stop 并通过 notification 收口 |
UI DOM + provider capture + queue count |
covered by conversation-session-background.test.ts |
| BG16 |
普通会话,background subagent child Bash tool update 已让 raw runtime running,但 main turn 已 idle;测试桥构造一条 held queued prompt |
用户点击 queued prompt “立即发送” |
不调用 stop 当前 background task;held queue stop 标记被清掉;queued prompt 直接成为 provider request;background Agent 后续自然完成并通过标准 <task-notification> 收口 |
UI DOM + provider capture + queue count |
covered by conversation-session-background.test.ts |
| BG17 |
普通会话,main turn 已调用 Agent(run_in_background=true),background Agent 已在统一 control UI 中 running,父 turn launch ack 仍未收口 |
父 turn active 时连续发送 Q2/Q3/Q4;父 turn 收口后 queue 自动 drain |
background running 不阻止父 turn active 期间普通消息进入 renderer queue;父 turn 收口后 Q2 继续 drain;Q2 active 时 Q3/Q4 仍必须留在 queue;Q3/Q4 drain 后必须渲染为可见 user message;Q2/Q3/Q4 依次 FIFO drain;background Agent completion notification 仍按标准链路消费 |
UI DOM + provider capture + background control |
covered by conversation-session-background.test.ts |
| BG18 |
普通会话,background Agent 已启动且原 Agent tool card 位于较早 assistant message;child Bash tool_use 被延迟 |
父会话 idle 后用户发送后续主消息并收到新 assistant 回复,随后 child Bash tool update 到达父 renderer |
child Bash toolCall 的 messageId 必须与原 Agent toolCall 相同,且 parentToolUseId 指向原 Agent;不能挂到后续主回复 assistant 下;Agent 完成后仍按标准 <task-notification> 收口 |
UI renderer store + provider capture + background control |
covered by conversation-session-background.test.ts |
| BG19 |
普通会话,background task running 且 main idle |
用户手动 /compact,随后 background task 完成 |
compact 不应因 background running 被拒绝;background completion notification 在 compact 后仍唤醒 main;provider request 同时包含 compact 摘要和 <task-notification> terminal status |
UI DOM + provider capture + compact marker |
covered by conversation-session-background.test.ts |
| BG20 |
guide 模式,background Agent launch tool result 已产生但父 turn 仍 active |
用户发送引导文本 |
guide 文本不走普通 future queue;后续 provider request 同时包含 Async agent launched successfully tool result 和引导文本 |
UI queue/projection + provider capture |
covered by conversation-session-background-guide-steer.test.ts |
| BG21 |
普通会话,background Agent 的 child Bash tool card 已经在原 Agent 卡片下显示,随后用户切到其他 session/draft |
child Bash 在父 session 不可见期间完成,background Agent completion notification 也被消费 |
切回原 session 后 child Bash 仍聚合在原 Agent 卡片下,工具名/description/output 不丢,状态必须从 running 收口为 terminal;不能退化成 Unknown、Bash 泛名或一直“执行中” |
UI renderer store + provider capture + session switch |
covered by conversation-session-background.test.ts |
| BG22 |
普通会话,background Agent 的 child Bash tool card 已经在原 Agent 卡片下显示且仍 running,随后用户切到其他 session/draft 又切回 |
切回原 session 时 child Bash 还没完成,之后 completion update 在可见状态到达 |
切回时 child Bash 仍聚合在原 Agent 卡片下并保持 running/non-terminal;完成后同一个 tool block 更新为 terminal,工具名/命令/output 不丢,不能退化成 Unknown 或一直“执行中” |
UI renderer store + DOM status + provider capture + session switch |
covered by conversation-session-background.test.ts |
| BG23 |
普通会话,右上角 background control 面板已显示两个 running Bash task |
第一个 background Bash 自然完成并触发 terminal update / snapshot 校准,第二个仍在 running;随后 stop 第二个 task |
terminal task 状态胜出并从右上角面板消失;仍 running 的 task 必须继续保留,不能因为 partial/stale update 或 snapshot 缺失而闪没;stop 后最后一个 active row 后续可正常消失 |
UI DOM + provider capture + task-notification |
covered by conversation-session-background.test.ts |
| BG24 |
普通会话,右上角 background control 面板已显示一个长跑 Agent 和三个短跑 Agent task |
第二个 Agent completion notification request 已开始但仍 in-flight 时切到其它 session/draft,再切回原 task;随后第三个 Agent 完成,第三个 notification turn 内模型执行 TodoWrite,长跑 Agent 仍 running;renderer presence probe 连续覆盖 restore/live overlap 到 main idle |
notification 处理中切回后的 live update 及第三个 notification/TodoWrite 处理中,仍 running 的 Agent row 必须持续可见;terminal Agent 可收口;stop 剩余 Agent 后最后一个 active row 后续可正常消失 |
UI DOM continuous visibility probe + provider capture + delayed task-notification + in-flight session restore |
covered by conversation-session-background.test.ts |
| BG25 |
background Agent 正在长程任务,父模型已经通过 SendMessage 注入 coordinator question |
child 在下一次 model step 调用 RespondToCoordinator,并在同一 response 继续普通工作 tool |
parent provider request 消费 model-only <subagent-message>;顶层 user messages 不显示 response marker;parent Agent card 保留 nested response tool block;child 继续工作并最终正常 completion;该独立 BG25 spec 不混入 compact divider |
provider capture + UI projection + core runtime ordering tests |
covered by conversation-session-subagent-respond-to-coordinator.test.ts |
| BG26 |
普通会话,模型调用 Agent(run_in_background=true);child-only provider marker 稳定返回 429 |
child 重试耗尽并发送 failed <task-notification>;用户检查 Agent 卡片并切换任务后返回 |
provider-visible summary 为 Agent ... failed. <raw provider message> 且 <error> 为同一原文;renderer store/live DOM 为 failed;“执行失败”可 hover 原文;切回 snapshot 后状态、输出、hover 都保持;main idle |
provider fixture + notification request + renderer store + DOM hover + session restore |
covered by conversation-session-background-subagent-rate-limit.test.ts |
| BG27 |
普通会话,background Agent completion 在 main idle 后触发独立 model-only wake |
notification turn live 渲染并刷新冷恢复 |
Agent description 作为结构化 title 显示;总结永久全展开,无“已工作 N 秒”和折叠控件;刷新后 title 不丢;navigator 数量不增加 |
runtime metadata + projection rows + UI DOM + session restore |
partial:runtime/product/cold/UI focused tests 已覆盖;pending manual-review 已补断言,但现有场景仍依赖旧 chat-input helper,尚未完成 V4 runtime 晋级 |
| BG28 |
普通会话,background Bash completion 在 main idle 后触发独立 model-only wake |
notification turn live 渲染并刷新冷恢复 |
既有 Bash title resolver 结果作为结构化 title 显示;总结永久全展开,无耗时和折叠控件;旧 session 缺 metadata 时不猜测 |
runtime metadata + projection rows + UI DOM + session restore |
partial:runtime/product/cold/UI focused tests 已覆盖;pending manual-review 已补断言,但现有场景仍依赖旧 chat-input helper,尚未完成 V4 runtime 晋级 |
| BG29 |
当前 session 有 running Bash;typed-count focused test 另覆盖 Subagent only 与 Bash + Subagent |
用户 hover / 点击 Composer 模式选择右侧后台入口 |
Composer 宽布局显示对应类型计数与类型化 tooltip;一次点击同时展开 Status panel 与所有非空“终端/智能体”区块,明细按 kind 分区;不聚合其它 session/workspace |
V4 formal UI DOM + focused component tests |
covered by conversation-session-v4-background-work.test.ts + UI tests |
| BG30 |
当前 snapshot 混合 running 与 terminal work;正式场景有一个 running Bash |
Bash 被 cancel 并完成 terminal 收口 |
只统计 running;零类型不占位并重置对应 open state;最后一个 running work 收口后 Composer 入口立即消失 |
V4 formal UI DOM + focused component/state tests |
covered by conversation-session-v4-background-work.test.ts + UI tests |
| BG31 |
Composer 容器宽度 <= 480px 且有 running work |
用户点击合并 Activity 入口 |
显示 Activity + running 总数;面板 overlay 展开并直接显示所有非空后台类型区块;没有 desktop inline offset 或横向溢出 |
narrow viewport WDIO + focused responsive tests |
partial:desktop continuous 覆盖;手机 replayable 恢复独立保留 |
| BG32 |
Goal/Todo/Git 等主状态与 running work 并存;focused test 另覆盖无主状态的 Bash only、Subagent only 与混合类型 |
Status panel 收起为 capsule |
胶囊有主状态时只显示主状态,不追加后台活动;无主状态时分别使用 terminal/Bot/Activity 图标与 running 总数兜底 |
focused component tests |
covered by UI focused tests |
| BG33 |
真实用户 Q1/A1 已完成,随后 background completion 在 main idle 时触发独立 model-only result turn B1;冷恢复读取同一历史 |
B1 完成后检查 assistant actions;再完成真实用户 Q2/A2 |
B1 不显示普通 retry;A1 不因 B1 无资格而恢复 retry;稳定 B1 的 fork 不受影响;A2 成为全时间线最新且具 real-user cause 后独占 retry;live/cold 与 UI 一致 |
product projection + transcript hydration + UI component DOM |
covered by product-projection.test.ts、transcript-hydration.test.ts、v4ConversationTurnGroup.test.ts |
| BG34 |
/goal continuation 启动 delayed background Agent;launch ack 后 main idle、child running;notification turn 后 verifier controlled in-flight |
main idle 时发送 Q2,再在 verifier request 已开始但未返回时发送 Q3 |
Q2 立即进入 provider request 且 queue=0;Q3 在 verifier 中只进入 future queue且 pass 前无 provider request;verifier pass 先写 target complete,随后 Q3 自动 drain、渲染真实 user row、queue 清空 |
UI queue/target + provider request order + runtime event callback |
partial:manual-review/pending/conversation-session-v4-goal-background-queue.test.ts 已用 replay fixture 验证通过,待人工验收后晋级 formal |
| BG35 |
显式 background Agent 的 child tool mirror 已是 running,parent turn 允许先 terminal |
parent TurnComplete(success) 先到,child tool terminal 后到 |
parent 收口不生成 fault.runtime.toolLifecycleIncomplete;parent phase completed 后仍用后到真实结果收口同一 child tool row;前台缺 terminal 兜底不变 |
core mirror provenance + product projection/profile convergence |
covered by subagent-tool-events.test.ts + product-projection.test.ts |
| BG36 |
provider-visible launch request 中三个 Agent tool use 均为 run_in_background=true,三个 child provider request 均已开始;父 launch turn terminal 后,V4 control.canStop=false 稳定保持且第一条 notification request 尚未出现;随后第一条 notification 通过 outer drain 启动 model-only provider request,另外两个 Agent 在该 request in-flight 期间完成并进入同优先级 runtime command queue |
第一条 request terminal,outer drain 再次可用 |
background-only 窗口先用 provider admission + V4 canStop 证明 main idle,不把异步 Subagent 目录计数当 admission 真相源;下一次 request 的最新 model-only user input 按 admission 顺序同时包含两个 <task-notification>;只增加一个 request;对应 notification 只持久化成一条 synthetic message,两个 ledger 输入 promoted 到同一 message ID;复用首个成员 source/workId 并按顺序合成 title 的普通 originMeta,live/cold 一致;最终 V4 canStop=false、queue 为空且 UI 无 synthetic user 气泡 |
provider launch/child requests + V4 canStop + runtime batch log + session message/ledger + UI DOM |
covered by conversation-session-background-notification-batch.test.ts + core queue/runtime/hydration tests;人工 review 已确认 artifact desktop-e2e-20260717-084002-026 并完成 formal promotion;合并后 formal case-local/default replay artifacts 为 desktop-e2e-20260717-092331-514、desktop-e2e-20260717-092428-959 |
| BG37 |
普通会话,模型调用 explicit background Bash,命令 timeout 明显短于实际耗时 |
Bash 越过原 timeout 后自然完成 |
tool result 立即返回 background task ID;control row 在原 timeout 后仍 running;最终 completed notification 被 provider 消费,且 started/terminal/notification 各一次 |
UI control + provider capture + runtime process test |
covered by formal conversation-session-background.test.ts |
| BG38 |
explicit Bash task ID 与 control row 已提交,parent turn 随后 stop/abort |
parent abort 与后台进程并发 |
已提交任务继续运行并自然 completed;无 orphan/重复 row/重复 notification;adapter focused test 同时覆盖 commit 前 abort 不留 task |
UI control + provider capture + adapter/core race tests |
covered by formal conversation-session-background.test.ts |
| BG39 |
普通会话,模型调用首 token 为 sleep 的 foreground Bash,timeout 短于命令耗时 |
foreground hard timeout |
tool result 为 aborted/timed-out 语义;无 background task ID、control row 或 task notification |
UI DOM + provider capture + runtime process test |
covered by formal conversation-session-background.test.ts |
| BG40 |
background Bash 的直接 shell 退出,孙进程继续继承 stdout/stderr;代表样本另覆盖脱离原进程组的后代 |
session/CLI 正常 close |
execution 在 pipe 未 EOF 时保持 ownership;teardown 不再触发 provider wake;原组后代被终止,逃逸后代的本端 pipe 被销毁;Browser/Execution/MCP 任一 close 悬空都不能阻断其它清理;CLI 有界退出 |
adapter process-group/pipe integration + runtime shutdown admission + CLI watchdog focused tests |
focused coverage,不新增 GUI E2E |