Repository navigation
Conversation
A Session's tools are fixed when it is created, so a Bot made by an older build never gains the tools of a newer one, and the Bot sits outside the conversation list, so the usual archive action does not reach it. The only way to get a new Bot was to edit the Host's data. The Bot's own page now has a restart button in its header. After a confirmation it archives the current Bot, opens a new one and switches to it. The confirmation says the checklist and scheduled tasks are not carried over. A failure is shown in the dialog and leaves the current Bot in place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
M4n5ter
left a comment
There was a problem hiding this comment.
English
Could we discuss whether replacing the Bot session is necessary to solve the tool-upgrade problem?
The current approach creates a fresh session without transferring conversation context or a handoff summary, and deliberately leaves the checklist and scheduled tasks behind. That makes sense for an intentional reset, but seems costly when the user only needs tools added by a newer build.
I also found two concrete issues in the current flow:
-
Recovery after partial failure does not work as described. If archiving succeeds but
openBotfails,botSessionretains the archived ID. Clicking “Maka Bot” then reopens that session instead of callingopenBotagain. -
The archived Bot’s original replies are no longer displayed correctly. Once a new Bot is registered, reopening the old session identifies it as ordinary and does not load its
SendUsertranscript.botOutboxonly reads the currently registered Bot. The records remain in storage, but the archived conversation no longer presents the replies previously shown to the user.
One alternative worth exploring would be to keep the existing Bot session and derive its tools from the current configuration. For example:
- The Host could select from the existing Bot coordination-tool list and the tools available in the current composition.
- A new Turn could receive the current tool set, while already prepared or running executions retain their original snapshots.
- The Bot’s creation-time tool list might then be removable as redundant derived state, while ordinary sessions keep their explicit tool restrictions.
This would preserve context, checklist, scheduled tasks and worker relationships without a migration. It is my current preference, but I may be missing a reason why the Bot’s tool list needs to remain fixed for the lifetime of its session.
Is that lifetime restriction intentional and necessary? If replacing the session is required, could we consider a context handoff instead? Existing fork/history-copy support may provide a starting point, although it does not by itself transfer Bot identity, outbox history or task ownership.
If the goal is also to offer an explicit “start over” feature, that seems worth distinguishing from tool upgrades so users can choose whether to discard continuity.
The two failure paths were checked through source tracing and focused behavior probes; the existing transcript tests passed, but a complete native desktop workflow was not exercised.
简体中文
想先讨论一下:为了解决 Bot 工具升级的问题,是否有必要更换整个 Bot session?
当前方案创建一个空的新会话,没有传递对话上下文或移交摘要,并且明确不迁移待办和定时任务。如果用户就是想清空重来,这可以理解;但如果只是想获得新版新增的工具,这个代价似乎偏大。
另外,当前流程存在两个确定的问题:
-
部分失败后的恢复方式与描述不符。 归档成功、
openBot失败时,botSession仍缓存旧归档会话的 ID。此后点击“Maka Bot”只会重新打开旧会话,不会再次调用openBot。 -
归档后的旧 Bot 回复展示不完整。 新 Bot 注册后,重新打开旧 session 会将它识别为普通会话,不再加载原来的
SendUser发言;botOutbox也只读取当前注册的 Bot。记录仍在存储中,但归档会话无法正常呈现用户之前看到的回复。
一个值得讨论的替代方向是:保留现有 Bot session,根据当前配置确定工具集合。例如:
- Host 可以从现有 Bot 协调工具清单和当前 composition 实际提供的工具中选择。
- 新 Turn 使用当前工具集合,已准备或正在执行的任务继续保留原快照。
- 这样或许就不需要永久保存 Bot 创建时的那份工具名单;普通会话显式设置的工具限制仍保留原有语义。
这个方向可以保留上下文、待办、定时任务和 worker 关系,避免迁移。目前我更倾向于它,但也可能遗漏了“Bot 工具名单必须在整个 session 生命周期内保持固定”的理由。
这个限制是否有意为之,又是否确实必要?如果必须更换 session,是否可以考虑移交上下文?已有 fork/历史复制机制可能提供基础,但它本身并不处理 Bot 身份、独立发言记录或任务归属的转移。
如果还希望提供用户主动“清空重来”的功能,我觉得可以与工具升级区分开,让用户决定是否放弃连续性。
上述两条失败路径已通过源码追踪和定向行为检查核对;既有 transcript 测试已通过,但尚未实际运行完整原生桌面流程。
|
Thanks for tracing this, and sorry for the late reply. Both failure paths are real, and I agree the PR mixes two different things.
I haven't confirmed that the refresh is safe against the admission checks yet. I'll first write it as a test against 简体中文感谢追查,也抱歉回复晚了。两条失败路径都成立,而且我同意这个 PR 把两件事混在了一起。
刷新在准入检查下是否安全,我还没有确认。我会先对着 |
EnglishThanks @liugddx, this sounds closer to the distinction I had in mind in your reply. I'd prefer splitting tool upgrades and “start over” into separate changes, with the upgrade work first. Starting a new conversation is a valid explicit choice, but it shouldn't be necessary to gain newly available tools. For tool upgrades, could we derive the effective tools at admission and freeze that result for the accepted work, rather than maintain a Session-level mirror that is written back while idle? The existing Concretely, new admissions would derive the Bot's tools from For “start over,” clearing the cached ID alone doesn't complete the recovery path. In The old transcript also needs a read path independent of the current registration. Right now We're not at the stage where I'd recommend adding backward-compatibility branches for old Bot records. I'd rather update the internal model directly. If existing development data needs a one-off adjustment, a small verified migration gist, linked from an appropriate place such as the PR body, would be fine; it doesn't need to become a second runtime path. For verification, I'd focus on the tools actually offered to the model, preservation of already accepted snapshots and ordinary Session restrictions, and—if the reset feature is kept—the next click after partial failure and the archived conversation's visible replies. The Maka-assisted checks at 简体中文感谢回复,这样区分更接近我之前的意思。我倾向于把工具升级和“重新开始”拆成两个改动,先解决工具升级。用户主动开始一段新对话是合理的独立选择,但不应该为了获得新增工具而被迫这样做。 工具升级这部分,能否在准入时推导有效工具集合,并为已接受的工作冻结这次结果,而不是再维护一份需要等空闲时写回的 Session 镜像? 现有的 具体来说,新准入的工作根据 “重新开始”的恢复路径,只清掉缓存 ID 还不够。 旧对话也需要独立于当前注册记录的历史读取路径。目前一旦注册了新 Bot,transcript 的身份判断 就会把旧会话视为普通会话,而 现阶段还不建议为旧 Bot 记录增加向后兼容分支,我更倾向于直接更新内部模型。如果现有开发数据需要一次性调整,可以提供一个实际验证过的迁移 gist,在 PR body 等合适位置放链接,不必因此在运行时永久保留第二条路径。 验证上,我会重点看模型实际获得的工具、已经接受的快照和普通 Session 限制是否保持,以及——如果保留重置功能——部分失败后的下一次点击能否真正恢复、归档对话能否显示原回复。这次由 Maka 辅助核对的 |
Summary
A Session's tool list is fixed at creation, so a Bot created by an older build never gains tools added later (this came up with #6528 and #6538). The Bot is also kept out of the conversation list, so the usual archive action does not reach it. The only way to get a new Bot was to edit the Host's data.
This adds a restart button to the Bot's own page header (shown only when the open conversation is the Bot). It asks for confirmation, then archives the current Bot, opens a new one with
openBot, and switches to it. The Host already supports this (an archived Bot is replaced byopenBot); this only adds the entry point.Headergets an optionalactionsslot; the button lives in a newBotRestartcomponent soui.tsxdoes not depend on it. Strings are added in English, Simplified and Traditional Chinese.Notes for reviewers
SessionActions. A reviewer's manual check of that flow would help.Test plan
ui_types+tsc), biome, workbench tests (77)🤖 Generated with Claude Code