Repository navigation
fix(acp): report live connection status - #1152
Conversation
The list_connections comment still described the spawn-time status field the previous commit removed. And the live_or_draining_agent_names filter on Connecting/Connected/Prompting only takes effect now that it reads SessionState: before, the frozen spawn-time copy reported every map entry as Connecting. Add a test that a connection still in its handshake counts and one that has published Error/Disconnected does not.
|
Verdict: the approach holds — ready to merge after one small follow-up commit. I confirmed the root cause. On the base branch, Pushed on top (one commit):
Notes, no change needed in this PR:
Verified with the 1.97.0 toolchain:
The changes were pushed to this pull request (1 file, +35/-6). 🤖 Generated with Codeg |
This release keeps tasks running while agents finish background work, makes configuration sync safer and adds appearance settings to it, adds Claude Code cache mode settings, reduces memory retained after closing conversations, and updates several agents. ## New - **Tasks and automation runs now wait for background work to finish.** Previously a run could end, and its background commands or sub-agents be cut off, as soon as the agent's reply finished. Now the run stays open until that work completes and the agent's follow-up reply arrives, and that reply becomes the run's summary. The task card shows how many background jobs are still running and offers a "Stop waiting" action. - **Configuration sync now includes appearance settings**: light/dark mode, theme color, zoom, fonts, background display and custom styles. - **New Cache mode settings in the Claude Code config panel**, with switches for the one-hour prompt cache of the main conversation and of sub-agents. ## Improved - **Updated Claude Code (claude-agent-acp 0.107.0) and OpenCode to 2.3.0, DeepSeek to 0.11.0, Cursor to 2026.11.13, Kimi Code to 2.6.2, Qoder to 1.1.89, ZCode to 0.85.2 and Command Code to 1.89.1.** The DeepSeek settings follow the new version's setup: it uses the Anthropic-compatible endpoint by default and requires Node.js 22.19.0 or later. ## Fixed - **Configuration sync no longer overwrites settings uploaded from another machine.** Fresh installs and machines that have not synced in a while no longer replace a newer remote snapshot. Instead, you can see where the snapshot came from and choose to restore it or replace it. Opening codeg in a new browser also no longer resets the server's appearance settings. (#1149, reported by @zinsser901224) - **Reduced memory retained after closing a conversation that showed a streamed reply.** (#1157 by @kogekiplay) - **Connected agent sessions are no longer shown as "connecting".** (#1152 by @kogekiplay) Thanks to @kogekiplay for contributing to this release, and to @zinsser901224 for reporting the sync issue. ----------------------------- # 发布版本 0.45.0 这一版让任务等智能体的后台工作完成后再结束,提升配置同步的安全性并支持同步外观设置,新增 Claude Code 缓存模式设置,减少关闭会话后的内存残留,并更新多个智能体。 ## 新增 - **待办任务和自动化运行会等后台工作完成后再结束。** 以前智能体一回复完,运行就可能结束,后台命令或子智能体也会被中断。现在会等这些工作完成、智能体发出后续回复后再结束,并以这条回复作为运行总结。任务卡片会显示仍在运行的后台工作数量,也可以随时「停止等待」。 - **配置同步现在包含外观设置**:明暗模式、主题色、缩放、字体、背景显示和自定义样式。 - **Claude Code 配置面板新增「缓存模式」设置**,可分别开关主会话和子智能体的一小时提示词缓存。 ## 改进 - **Claude Code(claude-agent-acp)更新至 0.107.0,OpenCode 更新至 2.3.0,DeepSeek 更新至 0.11.0,Cursor 更新至 2026.11.13,Kimi Code 更新至 2.6.2,Qoder 更新至 1.1.89,ZCode 更新至 0.85.2,Command Code 更新至 1.89.1。** DeepSeek 设置已适配新版的配置方式:默认使用 Anthropic 兼容接口,并要求 Node.js 22.19.0 及以上版本。 ## 修复 - **配置同步不再覆盖其他设备上传的配置。** 新安装或久未同步的设备不会再替换云端较新的快照,而是显示快照的来源,由你选择恢复还是替换。在新浏览器中打开 codeg 也不会再重置服务器上的外观设置。(#1149,由 @zinsser901224 反馈) - **减少关闭显示过流式回复的会话后的内存残留。**(#1157 by @kogekiplay) - **修复已连接的智能体会话被显示为「连接中」的问题。**(#1152 by @kogekiplay) 感谢 @kogekiplay 为本次发布做出的贡献,也感谢 @zinsser901224 反馈同步问题。
Problem
acp_list_connectionscould report a live ACP session asconnectingindefinitely. The connection map carried a spawn-time status duplicate while subsequent transitions were published to the sharedSessionState. The list endpoint read the stale duplicate instead of the authoritative session state.This was reproduced against the running desktop candidate: both the
claude_codeandcodexlist rows reportedconnecting, while their session snapshots reportedconnected.Change
SessionState.statusis now the sole status source for connection inventory and lifecycle checks:ConnectionManager::list_connectionssnapshots connection identity/state handles and reports each row from the shared session state.live_or_draining_agent_namesuses the same authoritative state.AgentConnection.statusfield and its staleinfo()accessor are removed.Regression tests verify that a status transition from
connectedtopromptingis reflected bylist_connections, and that the restore gate counts a handshaking session while excluding sessions that have publishederrorordisconnected. The restore-gate test and comment correction were contributed by @xintaofei ina19e8a02.Validation
pnpm buildcargo test --features test-utils acp::manager::tests::list_connections_reports_live_session_statuscargo test --features test-utils acp::manager::tests --lib— 144 passedgit diff --checkThe repository's current rustfmt check reports pre-existing formatting differences across the official baseline; this change was not used to reformat unrelated files.
The maintainer additionally reported 2,585 ACP tests, 73 backup-command tests and desktop Clippy passing on the follow-up commit. CI for that new head is tracked separately from the earlier 10/10 run.
Scope
This PR corrects the ACP connection inventory used by external
acp_list_connectionscallers and the backup-restore lifecycle gate. The frontend API wrapper currently has no caller insrc/. It does not claim to resolve the separate Web Content long-term memory growth investigation; that remains under observation with independent physical-footprint sampling.