Repository navigation
Main Bot can create and change Bots but has no tool to remove or retire one #638
Description
Summary
The Main Bot is documented as the highest-rights Bot that "creates, changes and removes other Bots", but the tool surface it actually gets has no way to remove one. Deletion exists only in the UI channel, so a Main Bot can build a team but never retire a member or reorganise it. This issue is to decide whether that is intentional and, if so, what the supported path should be.
What happens today
core/src/host/tools.jsregisterscreate_bot,update_botandstop_botfor the model. There is nodelete_bot(and no archive/hide).core/src/host/channel.jshas adelete-botendpoint used by the UI, callingrt.deleteBot, so the core can delete a Bot — it is just not exposed to Bots.stop_botis the only intervention a Main Bot has: it ends a running turn, it does not remove the Bot.update_botcan rename or repurpose it, so a "retired" specialist keeps sitting in the sidebar, counting against the tree'smaxChildren(8) and against the sidebar itself.- The tree plugin (tree: cannot move a bot to a new parent; bots skipped by maxChildren never rejoin #635) has the same shape for parent edges: the parent is fixed at creation, and there is no reparent tool. Deleting a tree Bot does re-attach its children upwards; the deletion needed for that work is again UI-only.
We hit both limits on a real team: Chief reached maxChildren, new Bots stayed outside the tree, and there was no way to free a slot or move an existing Bot under a coordinator without deleting from the sidebar and recreating (losing the conversation).
Why this needs a decision
Deletion is destructive and irreversible: the Bot's conversations and memory go with it, and an autonomous model can decide to do that on its own. Keeping it human-only is defensible. What is not defensible is the mismatch: the prompt and the README tell the Main Bot it can remove Bots, and the model has no such tool, so it reasons about capabilities it does not have.
Options
A. Keep deletion human-only, and say so. Document that only the owner deletes Bots; make the Main Bot's prompt/README say it creates, changes and stops, never removes. Lowest risk, but a Main Bot still cannot reorganise a full team.
B. Add delete_bot with guards. Main Bot only; require an explicit confirmation (e.g. an ask_user card naming the Bot and what is lost) or a dry-run that reports the number of conversations/memory entries; refuse for Main Bots and for the caller. This keeps the structural ability but makes an irreversible action deliberate.
C. Add a reversible archive instead of deletion. The tree plugin already has fields['flybot-tree'].retired (adoption skips it, and the sidebar lists it outside the tree) but no tool sets it. A retire_bot/unretire_bot pair would free tree slots and hide a Bot from coordination while keeping its history, leaving real deletion to the owner.
My preference is C plus A: reversible for the team, irreversible for the human. B is acceptable if C is too much, but B alone still makes an autonomous agent able to destroy history.
Related
- tree: cannot move a bot to a new parent; bots skipped by maxChildren never rejoin #635 — no way to move a Bot to a new parent; bots skipped by
maxChildrennever rejoin. - Tree limits:
maxDepth5,maxChildren8 (plugins/tree/limits.json).
Acceptance (for whichever option is chosen)
- The Main Bot's prompt and README match the tool surface.
- If a tool is added: Main-Bot-only, refuses self/target errors cleanly, and an irreversible path requires an explicit confirmation that names what is lost.
- If only documentation changes: no code change, and the prompt no longer claims a removal right.
Activity
hsliuustc0106 commentedon Oct 21, 2026
Related point raised by the user: deleting a Bot does not delete its memory today.
deleteBot(core/src/host/roster.js:490) callsrt.archiveBotMemory(id)before removing the Bot.archiveBotMemory(core/src/host/memory.js:628) moves the Bot's own memory directory tomemory/archive/<botId>-<timestamp>and journals anarchiveop. The team memory is not touched.Questions for the same decision:
retire_bot, archived memory fits naturally: retire keeps everything, purge is the human-only irreversible action.Also: deleting a Bot leaves its team-memory entries in place; decide whether a purge should scan and remove entries authored by that Bot.
Birfy commentedon Oct 23, 2026
Triaged on
be48393b. The mismatch is real —core/src/host/tools.jsregisterscreate_bot,update_botandstop_botfor the model, and nothing removes or retires a Bot, while the prompt and the README say the Main Bot removes other Bots — but which way to close it is the owner's call, so this needs a decision before anyone writes code.Two ways out, with different risk:
maxChildren(8), its conversations are kept, and the owner can restore it. Deletion stays UI-only. This closes the practical pain in the issue (Chief hitmaxChildrenand could not free a slot) without giving a model an irreversible destructive action.agent-readyon your word.Deletion itself should stay human-only either way: it takes the Bot's conversations and memory with it, and
stop_botalready exists as the non-destructive intervention.Say A or B (or "both": A now, B as the doc half) and I will turn the chosen slice into acceptance criteria and flip this to
agent-ready.Birfy commentedon Oct 29, 2026
Written-by: Triage
Owner 决定:只加 archive(退役),删除仍只归人(用户 2026-10-29 拍板「全按建议走」)。
范围:给 Main Bot 增加一个 archive 工具(
core/src/host/tools.js的注册表 + 相应 roster/store 支持),把 Bot 标记为退役:让出树的 maxChildren 名额、不再出现在默认活跃名单,历史与会话仍可读可查;不新增任何 delete_bot 给模型。不做:删除、不做 reparent。
验收:单测断言 archive 后树 maxChildren 计数释放、活跃名单不再列它、历史仍可读;非 Main Bot 调用被拒;撤掉改动后变红。
Birfy commentedon Oct 29, 2026
Written-by: Triage
Scope confirmed from the 2026-10-29 owner decision above — no code re-research needed. Kept
agent-ready; dropped the stale conflicting state label so exactly one state label remains.Brief: Main-Bot-only archive tool in
core/src/host/tools.js+ roster/store support; acceptance = tree maxChildren slot freed, default active list omits the Bot, history/sessions still readable, non-Main caller refused, test red without the change.Add a Main-Bot-only archive_bot tool that retires a Bot (#638)
Birfy commentedon Oct 29, 2026
Written-by: Dev
Claimed #638 — first step: the Main-Bot-only
archive_bottool and the retired field write. Branchdev/638-archive-bot.Add a Main-Bot-only archive_bot tool that retires a Bot (#638)
Add a Main-Bot-only archive_bot tool that retires a Bot (#638)
Add a Main-Bot-only archive_bot tool that retires a Bot (#638)