Skip to content

pi-fff: switching modes leaves stale tool names active after /reload #855

Description

@RunMintOn

Summary

registerPendingTools only ever adds names to the active tool set, never removes old ones. After switching from override back to a FFF-named mode and running /reload, the restored active list still contains the previous mode's tool names, so the model sees duplicate search tools.

Per the README, override replaces the built-in find / grep, and switching modes takes effect after /reload when the tools are registered again. The stale names contradict both statements.

Reproduction

  1. Start Pi with pi-fff in override mode (grep / find active).
  2. Run /fff-mode tools-and-ui, then /reload.
  3. Check the active tools (e.g. via /tool or the model's tool list).

Actual

Stale search tools stay active alongside the final mode's names: grep, find, ffgrep, fffind (functionally duplicated in pairs).

Expected

The active set matches the final mode: only ffgrep / fffind (plus fff-multi-grep when enabled).

Verification (two-session mock on #854's branch)

Fresh extension instance per reload, one shared persisted active list:

direction active set after reload status
default -> override read, grep, find fixed by #854's prune
override -> default read, grep, find, ffgrep, fffind still open (this issue)

Notes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions