Repository navigation
fix(tools): keep the tool order when navigation restores the same tools - #1405
Conversation
The re-apply reordered the tools even when pi restored the same loadout, which changed the prompt and re-billed the cached conversation.
…l set Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks. I reproduced this on main: the new test fails there. With the real SDK and a faux model, navigating back to an earlier leaf moved Keeping |
Thanks for pi-web — I've used it for a long time and really like it; this is the first real problem I've run into.
Problem
Editing a history message reorders the same tools:
navigateTreeKeepingToolSelection()re-applies the selection after the navigation restored the branch's loadout, andresolveActiveToolNames()moves every coding tool in front of the carried ones.Nothing was enabled or disabled: only the order changed, which rewrites the system prompt and drops the cached prefix, so the next request re-bills the whole conversation.
Reproduction
1, then2.2, resend as2.2.systementry whose<tools>section carries the order above.