Skip to content

Looper v2.14.171

Choose a tag to compare

@github-actions github-actions released this 13 Nov 03:50
· 151 commits to main since this release
0234e53

Looper v2.14.171

This is the patch release v2.14.171, a hotfix line in which each merged change ships at once. It documents one change: #1314 (Manager: a slow stop of the old session does not fail the user's message).

Release Decision

Who should upgrade: Installations whose Manager runs a resident Claude session and whose user messages failed or stalled when the old or stale session was slow to stop. Others need not upgrade for behavior.

What this release solves: #1314 stops an idle stale or replaced resident session with a kill and waits only for its main process, so a slow stop no longer fails the user's message; a turn that fails before the model received the message is retried once.

Breaking changes: No. There is no migration or database schema change. The Manager's turn start behaves differently as described below, which the pull request calls an intended maintainer decision. The bridge boundary is unchanged: upgrade to v2.13.165 first if the installation is older.

How to verify: Check the installed version.

looper --version   # looper 2.14.171

Contributors: Maintainer @foolzzz authored #1314; no community contribution was included in this release.

Upgrading

The bridge boundary is unchanged: an installation older than v2.13.165 must upgrade to v2.13.165 first (upgrade to v2.13.165 first) and be started once; see the Upgrading section of the v2.14.0 release for the steps and rollback. An installation on v2.14.0 to v2.14.170 upgrades directly. There is no database schema change.

Behavior changes

Read in the code of #1314:

  • Stopping the old session (looper/agents/tiers/manager.py, looper/agents/claude_cli.py). When a turn starts and the resident session is stale or belongs to a replaced runtime, the Manager now stops it with stop(kill=True, wait_tree=False) (new _stop_replaced_session). That kills the main process and waits only until its exit is seen; the cleanup of its descendant processes continues in the background and is joined by a later default stop. The step's budget (claude_stop) rises from 10 s to 30 s. wait_tree=False without kill=True raises ValueError. A kill also skips the stdin-close grace for the stop. Other runtime types that do not use ResidentClaude still get a plain stop(kill=True).
  • No resume beside a leftover process (claude_cli.py). While a background-cleaned main process has not exited, stale() stays true, so a replacement does not resume next to its old main process. A user turn waits for tracked cleanup except the background ones.
  • One retry before delivery (manager.py, looper/agents/tiers/turn_token.py). If a turn fails with a timeout, OSError or TurnFailed in the claude_stop, switch_session or claude_start step, the Manager waits 5 s and tries once more. It reuses the already admitted message and lock (TurnToken.prepared_ask) and a fresh run state. There is no retry when the message was already sent to the model, the turn was cancelled, a hosted runner's claude_start failed (hosted runners own their startup recovery), a later step failed, or this was already the second attempt; the error then surfaces as before.
  • Model-visible changes: None to prompts or tool descriptions. The retry happens before the message reaches the model, so the model sees the message once.

Optional Capability Activation & Use

No new optional capability activation is introduced in this release.

Validation

Reported by the pull request: #1314 reports the tests that cover the change (tests/test_manager_startup_recovery.py, tests/test_manager_stop.py, tests/test_manager_stop_faults.py, tests/test_claude_cli.py), automated reviews, and CI before the merge. It does not report a local full suite or the result of the reviews.

CI: CI runs after the release is drafted; its result is not recorded here.

Not tested for this draft: a local full suite, a real Manager session restart and the built wheel. The release documentation gate checks the body only.

中文摘要

本版本是 patch release v2.14.171(热修线,每个合并的改动立即发布),说明一项改动:#1314(Manager:旧会话停得慢,不再让用户消息失败)。

升级决策

**谁需要升级:**Manager 使用常驻 Claude 会话,且用户消息曾因旧会话或过期会话停止缓慢而失败或卡住的安装。其他安装没有行为上的升级需求。

解决了什么:#1314 对空闲的过期或被替换的常驻会话用 kill 停止,只等待其主进程退出,慢停不再让用户消息失败;消息送达模型之前失败的轮次会重试一次。

**是否有破坏性变更:**否。没有迁移或数据库结构变更。Manager 的轮次启动行为按下文所述改变,PR 称这是维护者有意的决定。桥接边界不变:早于 v2.13.165 的安装须先升级到 v2.13.165。

**如何验证:**核对版本为 2.14.171。

**贡献者:**维护者 @foolzzz 提交 #1314;本版本无社区贡献。

looper --version   # looper 2.14.171

升级

桥接边界不变:早于 v2.13.165 的安装必须先升级到 v2.13.165 并启动一次(upgrade to v2.13.165 first 即先升级到 v2.13.165),步骤与回退见 v2.14.0 发布说明的升级一节。v2.14.0 至 v2.14.170 上的安装可直接升级。数据库没有结构变更。

行为变化与入口

以下在 #1314 的代码中可见:

  • 停止旧会话(looper/agents/tiers/manager.py、looper/agents/claude_cli.py)。轮次开始时,若常驻会话已过期或所属运行时被替换,Manager 现在用 stop(kill=True, wait_tree=False)(新增 _stop_replaced_session)停止它:杀死主进程,只等到看见其退出;后代进程的清理在后台继续,之后的默认 stop 会等待它。claude_stop 步骤的时限由 10 秒升到 30 秒。wait_tree=False 而不带 kill=True 会抛 ValueError。kill 同时跳过 stdin 关闭的宽限。不使用 ResidentClaude 的其他运行时仍用普通的 stop(kill=True)。
  • 旧进程未退出时不恢复(claude_cli.py)。后台清理中的主进程尚未退出时,stale() 保持为真,替换的会话不会与旧主进程并存地恢复。用户轮次会等待被跟踪的清理,后台清理的除外。
  • 送达前重试一次(manager.py、looper/agents/tiers/turn_token.py)。轮次在 claude_stop、switch_session 或 claude_start 步骤以超时、OSError 或 TurnFailed 失败时,Manager 等 5 秒后重试一次,复用已受理的消息和锁(TurnToken.prepared_ask)以及新的运行状态。消息已发给模型、轮次已取消、托管运行器的 claude_start 失败(托管运行器自己负责启动恢复)、失败发生在其他步骤或这已是第二次尝试时不重试,错误照旧抛出。
  • **面向模型的变化:**提示词和工具描述无变化。重试发生在消息到达模型之前,模型只会看到该消息一次。

可选能力启用与使用

本版本未新增可选能力启用入口。

验证

PR 报告的:#1314 报告了覆盖该改动的测试(tests/test_manager_startup_recovery.py、tests/test_manager_stop.py、tests/test_manager_stop_faults.py、tests/test_claude_cli.py)、自动评审,以及合并前的 CI。未报告本地完整套件,也未报告评审结果。

**CI:**发布草稿后 CI 会运行,其结果未在此记录。

**本次草稿未测试:**本地完整套件、真实的 Manager 会话重启以及构建出的 wheel。发布文档 gate 只检查正文。