
@zosmaai/pi-llm-wiki v0.11.3 is out — a round of reliability fixes for the background engine
Our LLM wiki extension just got a solid reliability release — the interesting bit is the bug we found while reviewing our own toast feature.
Quick context: LLM Wiki is a pi extension that keeps a Markdown vault of everything an agent learns — sources, entities, concepts — with automatic metadata and recall injected into future sessions.
v0.11.3 has the usual stuff (MCP bootstrap for MCP-only clients, layered recall over MCP, gap-snapshot persistence fix), but the one I want to talk about is the stale session context race:
We shipped an "instant completion toast" for background actions. The code read ctx.hasUI/ctx.ui after an await inside the background task. If the user switched sessions or reloaded pi while a long lint was running, that ctx is a stale proxy — property access throws. The catch block then fired a false "task failed" warning and skipped the real success report entirely. Worst case of the exact thing toasts were supposed to fix.
The surrounding code already had a comment warning about this exact hazard in the sibling function — we just didn't mirror it. One-line fix (capture before await), plus a regression test where the ctx getters throw once work is in flight. Test fails on the old code, passes on the new. That's the kind of bug that's invisible in unit tests against fresh ctx objects and only shows up in the real session lifecycle.
Repo: https://github.com/zosmaai/pi-llm-wiki
Anyone else hit stale-context issues with extension APIs that hand you proxied context objects?