From c70edd39a68a58d6ce5bc7f66505ac8937df8cbc Mon Sep 17 00:00:00 2001 From: Codex Date: Thu, 11 Jun 2026 05:33:08 +0000 Subject: [PATCH] docs: record AgentRun session recovery supervision --- docs/reference/code-queue-supervision.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/reference/code-queue-supervision.md b/docs/reference/code-queue-supervision.md index 368667fa..33dfc805 100644 --- a/docs/reference/code-queue-supervision.md +++ b/docs/reference/code-queue-supervision.md @@ -279,6 +279,10 @@ PR 小修、冲突、rebase、补测和 reviewer feedback 的新执行入口是 旧 Code Queue task 只保留历史审阅和残留停止;需要基于旧任务产出继续推进时,在 AgentRun payload 中显式引用旧 task id、PR/branch 和审阅结论,而不是把旧 task 重新入队、resume 或 double-write。 +AgentRun turn 的 timeout 监督按无响应空闲时间处理,而不是固定 wall-clock `backend-timeout`。只要 result/session liveness 的 `lastActivityAt`、`lastActivitySeq` 或 events 仍在刷新,指挥官应继续轮询,不应 interrupt、重派或判定 backend 死亡。若 command 因 idle timeout、provider stream disconnect、runner stdio inactive 或其他非业务终态停止,指挥官本人必须先读 `result`、`events` 或 `logs/trace`,确认最后有效工具输出、已完成修改、失败原因和下一步,再把这个摘要作为后续 prompt 发送给 Artificer;不能要求 Artificer 自己去猜旧 trace,也不能因为一次 timeout 就停止整个交付。 + +Artificer 默认应携带可续跑 `sessionRef`。仍有 `sessionId` 的 follow-up、补测、reviewer feedback 和 timeout 恢复,优先使用 `bun scripts/cli.ts agentrun send session/ --aipod Artificer --prompt-stdin` 或 `steer session/` 继续同一个 session;只有历史任务没有 `sessionRef`、session 已 evicted、或同 session 已证明不可恢复时,才创建新 AgentRun task。新 task 必须在 prompt 中写明“这是基于旧 task/trace 的 manager-read continuation”,并记录旧 task/run/branch、管理者读 trace 得出的当前状态和下一步。 + replacement runner 只用于方向明显错误、质量不可接受、原 task 上下文不可恢复、原分支/PR 已废弃,或 AgentRun reuse/steer 已证明无法继续的情况。关闭或替换旧 PR 时必须在 PR/body/final response 中说明 superseded/replacement 关系,避免 competing branch 扩散。 ## 监控