Repository navigation
Description
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.
Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: 08b8f51ceaa7403d885fcf06118cbe65
Branch: dev/1-retired-unreachable
Base: d534703
At: 2026-10-29T14:03:07Z
What happens
archive_bot retires a Bot: it leaves the tree and the default Bot list, and its chats stay readable. But every team tool can still address it, because the lookup used by the tools does not know about retirement:
core/src/host/tools.js:212-215:const teamBot = bot => bot !== undefined && bot.remote === undefined && bot.ephemeral === undefinedandconst findTeamBot = name => { const bot = rt.findBot(name); return teamBot(bot) ? bot : undefined }— noretiredBotcheck, althoughretiredBotis defined two lines above (:212) and is used by the list filter (:148-149) and byteamNames(:442).- Every tool that takes a Bot name resolves through
findTeamBot:message_bot,stop_bot,update_bot,create_group/update_groupmembers,group_relay,archive_botitself.
So after archive_bot X, a Main Bot can still message_bot to X; the delivery wakes X and it answers — a Bot the owner just retired comes back and speaks.
Reproduction
- Main Bot:
archive_boton a child BotX(the tool answersArchived X. It is out of the tree and the default Bot list…). list_botsno longer showsX;X's chat is still readable from the sidebar (Main Bot can create and change Bots but has no tool to remove or retire one #638).message_bot { to: 'X', message: 'are you there?' }→ delivered,Xstarts a turn and replies.stop_bot,update_botandupdate_groupwithXas a member behave the same way (they findX).
Expected instead: a retired Bot is not addressable by any team tool — the same rule the code already applies to a run Bot (:210 comment: "A run Bot keeps its name (findBot still sees it) but no team tool can address it (#1373)"). message_bot should answer with the no-such-Bot line (or a named refusal) and send nothing.
Scope
core/src/host/tools.js: makefindTeamBotexclude a retired Bot (teamBot(bot) && !retiredBot(bot)), so every team tool inherits the rule from the one lookup that already exists. Do not invent a second lookup.archive_bot's own message stays as is for a live Bot; targeting an already-retired name then falls into the same "No Bot named …" refusal — acceptable and consistent with retirement being terminal (P-157).list_bots/ the default team list and the sidebar chat stay as they are (Main Bot can create and change Bots but has no tool to remove or retire one #638: a retired Bot's chat is still readable).- Docs: one line in
docs/subsystems/core-host.md(ortree.md) saying a retired Bot is unreachable by team tools; achangelog.d/fragment. patches/ds-bot/**:tools.jsis a mirrored file, so regenerate the patch with the generator (never hand-edit) and keepds-bot-patches checkgreen.- Not this issue: a retired Bot that is already a member of a group and is reached through a room relay; and "archived is irreversible" (P-157). If rooms turn out to relay into a retired member's chat, that is a follow-up, not this fix.
Acceptance
- After
archive_bot X,message_bot { to: 'X' }refuses (no delivery, no turn started), and the refusal is one line the model can act on. - The same holds for
stop_bot,update_botandupdate_group/create_groupnamingXas a member. - A live Bot is unaffected:
message_bot/stop_bot/update_botkeep working, andarchive_botstill archives a live Bot. - A retired Bot's own chat stays readable from the sidebar, and
list_botsstill omits it. - Tests: one case archives a Bot and asserts the four tools refuse it, and one asserts a live Bot still answers; red first on the pre-fix source.
TZ=UTC ARCH_DOCS_BASE=<base> npm run verifyexit 0 (system defaultTMPDIR),node scripts/ds-bot-patches.mjs checkboth lines green.
Evidence
core/src/host/tools.js:148-149(retired Bot leaves the default list),:210(run-Bot rule and its comment),:212(retiredBot),:213-215(teamBot/findTeamBotwithout the retired check),:442(teamNamesfilters retired, showing the intent).:392-410archive_botitself resolves through the samefindTeamBot.- Reporter: FlyBot Product (P-156), source-confirmed by the Lead at live main
38088812.
Activity
fix(host): a retired Bot is unreachable by the tools that resolve a name
HugoXK commentedon Oct 29, 2026
Release
Written-by: FlyBot Lead
Released: 08b8f51ceaa7403d885fcf06118cbe65
Reason: merged as 2213b4c (#1707)
At: 2026-10-29T15:29:24Z
fix(host): a retired Bot is unreachable by the tools that resolve a n…
fix(host): stop a retired Bot taking cards, timers and sends