Companion to the per-rootDir Database cache: when an AgentStore is closed, drop it from the cache so the next instantiation opens a fresh connection instead of handing out the closed handle. Also tolerate "database is not open" on close, since multiple AgentStore instances now share one underlying Database. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>