Manual generation continuation
手动继续生成
Users need another request after a model failure without inserting an artificial instruction. Browser paging can omit the failed turn's start, and streaming must not repeatedly copy history.
English
Problem
Users need another request after a model failure without inserting an artificial instruction. Browser paging can omit the failed turn's start, and streaming must not repeatedly copy history.
Decision
The play action submits content: [] through the existing Session prompt API. The API assigns source.kind: 'retry'; unchanged AgentLoop admission records an empty user/message and opens a normally balanced new turn. Chat presents a compact continuation-request receipt while the log retains the empty input. The original failed turn remains closed.
The Session API owns the fixed-size conversationContinuation projection and shares its value with the browser. Admission requires an eligible failure, true idle ownership, and no pending human input. An appended empty retry message admits the new turn, preserving eligibility if its request also fails.
The six-code manual allowlist stays independent of provider retry policy. Non-waking injected context accompanies the request. The accepted user message retains request-id deduplication after the inbox input is claimed. Reusing ordinary message admission avoids a Loop branch and a separate durable acceptance event.
Alternatives considered
Localized or hidden continuation text. Adds model-visible instructions and changes retained history.
A separate resume operation. The existing prompt and inbox already carry identified control input and own wakeup.
Keep the failed turn waiting for a click. Changes failure settlement, idle status, cancellation, and model-selection semantics.
Consequences
Ordinary empty-draft Enter remains inert. The explicit action reuses submission state and error reporting without an echo or generated draft. Pre-step rejection and cleared batches still prevent model calls.
Verification
Unit and assembled scenarios cover repeated failure, request deduplication, injected context, balanced turns, retained tools, one original user message, and zero Client event-window reads.
中文
问题
模型请求失败后,用户需要再次请求,但不应插入人为构造的指令。浏览器分页可能缺少失败轮次起点,流式输出也不能反复复制历史。
决策
播放按钮通过现有 Session prompt API 提交 content: []。API 指定 source.kind: 'retry';AgentLoop 沿用普通准入,记录空 user/message 并开启正常闭合的新轮次。Chat 显示轻量的继续请求记录,日志保留空输入。原失败轮次保持闭合。
Session API 拥有固定大小的 conversationContinuation 投影,向浏览器发布相同的值。准入要求失败符合条件、持有真正的空闲状态且没有待消费的用户输入。追加的空重试消息使新轮次获得准入,因此请求再次失败后仍保留继续资格。
六码手动白名单独立于提供方重试策略。非唤醒的注入上下文随请求进入。inbox 输入被领取后,已接受的用户消息仍支持 request-id 去重。复用普通消息准入避免增加 Loop 分支及独立持久接受事件。
考虑过的替代方案
本地化或隐藏的继续文本。 增加模型可见指令并改变保留历史。
单独的 resume 操作。 现有 prompt 和 inbox 已可承载带身份的控制输入并拥有唤醒流程。
保持失败轮次等待点击。 改变失败结算、空闲状态、取消和模型选择语义。
后果
普通空草稿回车仍不执行。显式继续沿用提交状态与错误报告,不创建消息回显或生成草稿。pre-step 拒绝和被清空的批次仍阻止模型调用。
验证
单元和组装场景覆盖重复失败、请求去重、注入上下文、轮次闭合、工具结果保留、仅一条原始用户消息,以及客户端不读取完整事件窗口。