The user decided both questions the previous entry left open: the facts are not wanted, and the extension has no business running when pi is driven by a script. Neither change touched a page in this vault.
The bank cleanup went through Hindsight's REST API, since the memory MCP server has no delete. Deleting a document cascades to the facts extracted from it and to their links. The candidates were every document tagged project:ru-regen-0914 or project:ru-batch-0914, and each had to have a pi- id and no tag besides pi and its project, so nothing another writer had put under those tags could go with them; all 140 matched and were deleted, taking 2449 facts. The queue still held 102 retains carrying the same tags, which were cancelled, and nine more already in progress, which cannot be. A background job waited for those nine, the longest of them stuck since 07:15, and deleted the 10 documents and 234 facts they produced once they finished. Both tags now have no documents. One consolidation that began at 06:33, before any of this, still lists both tags among five it will refresh; it creates no documents, and it is shared with other tags, so it was left alone. In all, 150 documents and 2683 facts came out.
The fix is in ai-workspace, commit bafe67f, synced to this machine with ai-sync sync pi (doctor: clean). hindsight-memory.ts now runs its index, its recall and its capture only when ctx.mode is tui, the same gate herdr-agent-state.ts already used. A pi started with -p, --mode json or --mode rpc makes no request to the memory server unless HINDSIGHT_HEADLESS=1, while the memory_recall and memory_retain tools and /memory recall still work, because those run only when something asks for them. The Claude Code pi plugin was never affected; it already starts pi with --no-extensions. A new test drives one whole turn against a stubbed fetch and counts requests: none in print, json or rpc mode, four in the TUI. Five mutants each removed one piece of the gate, and the first run left one alive: taking the gate off capture turned nothing red, because the recall handler returned before it recorded the prompt, so capture had nothing to send either way. The prompt is now recorded before the mode check, each of the two paths has a gate of its own, and all five mutants fail the suite.
Measured after the sync: a one-word pi -p through the full profile takes 5.3 to 6.1 seconds, down from 13 to 14, and leaves no document in the bank. With only this extension loaded it costs 4.7 seconds against 2.5 for none, where it cost 15.9 against 1.2 before; the rest of the profile's extensions account for the remaining difference. translate-page.sh was not changed.