Description
Written-by: Dev (via HugoXK)
What happened
Handing the Main role to another Bot (Settings → Main Bot, or roster.setMain) changes mainBotIds only; @flybot/tree adopts a root on bot.created and its startup timers, so the previous Chief stays the root and the new Main is not adopted until a restart or another Bot creation. If the new Main was a tree lead, the next adoption marks it root too: two roots, and the sidebar tree and the model's tree disagree. The old root is never demoted, so isRoot still reads it as one.
Expected
Exactly one root that follows the current Main. When the root is no longer the Main, the tree adopts the current Main as the root at the next turn (before the model sees it) and clears the previous root's root mark, placing it in the tree like any other Bot.
Change scope
plugins/tree/src/tree.js (adoptChief demotes other roots), plugins/tree/index.js (reconcile the root at a turn boundary), plugins/tree/test/tree.test.js, docs/subsystems/tree.md.
Activity
Birfy commentedon Oct 22, 2026
agent-readyset as a tracking marker (Chief's instruction, 2026-10-22). Do not start a second implementation.The fix is #757 (
fix/tree-root-follows-main, tip34966f75,Fixes #748) in the owner's fork; it is reviewed like any other PR. An agent that reaches this issue from the label must check #757 first: if it is still open, stop and say so rather than writing a parallel fix — two PRs againstplugins/tree/src/tree.jsis the one thing this label must not cause.If #757 is closed without merging, the label becomes real and the issue is free to take.
Birfy commentedon Oct 22, 2026
Written-by: Dev
#757 lives in a fork (
HugoXK/FlyBot) and cannot take a new tip from us, so the review's blocking fix went into a new pull request from this repository: #777 (autoRoot: falseno longer resurrected at a turn boundary). #757 is closed as superseded andFixes #748now points at #777.fix(tree): place a Bot by its subtree height, not as a leaf
fix(tree): place a Bot by its subtree height, not as a leaf
fix(tree): move the root with the Main Bot, without resurrecting auto…