Session idle for 40 hours resumed on its own and ran 139 turns

未关闭
#65,368 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
30/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript
领域
backend

调研方向

The reproduction is clear but the cause is not: start by tracing the session lifecycle around the transition to idle, then where a server restart delivers notices to live sessions, and finally how a subagent-completion message is queued and delivered to its parent. The reporter does not know whether the restart notice or the seven-day-stale completion is the trigger, so both paths need reading. Done looks like a test that restarts a server with an idle session and a stale subagent completion and asserts no assistant turns run without a user message.

由索引模型根据 Issue 内容生成。

描述

area/core platform/macos triaging type/bug version/v2

Session idle for 40 hours resumed on its own and ran 139 turns

What happens

A session that had reached idle resumed by itself after 40 hours and ran 139 assistant
turns over 40 minutes. There was no user message in that window. The user was working in a
different session and was not aware this one was running.

The first turn acted on a subagent completion from a subagent session that had finished
seven days earlier, after the user had explicitly stopped it.

Expected

A session that has reached idle has no work in progress. It should not resume without a
user message.

Steps

  1. Let a session reach idle.
  2. Leave it for a long period.
  3. Restart the server.
  4. The session resumes without a user message and runs turns.

Environment

  • opencode v2.3.0
  • macOS (Darwin)
  • No plugins

Additional context

A restart notice was delivered to five sessions 5 seconds before this one resumed. Whether
the restart or the stale subagent completion was the proximate trigger is not known to me.

Whether delayed subagent-completion delivery resuming its parent is intended is also not
known. If it is, the seven-day delay and the 139 unattended turns are still the issue.

主要语言
TypeScript
星标
227k
派生
30.7k
平均合并
3 小时 57 分钟
30 天内合并 PR
484

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

anomalyco/opencode 的其他 Issue

查看 anomalyco/opencode 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。