Files
oh-my-pi/packages/coding-agent/src/mcp
Kevin LoftisandGitHub 2f97e36209 fix: invalidate capability fs cache after writing MCP config (#199)
writeMCPConfigFile writes to disk via node:fs, but the capability
system's readFile (capability/fs.ts) caches file contents in an
in-memory Map. When /mcp reauth writes a new credential ID to the
config file and then #reloadMCP calls discoverAndConnect, the
builtin provider's readFile hits the stale cache and returns the
old config — causing the connection to use the old (deleted)
credential ID and fail with HTTP 401 missing_token.

Fix: call invalidateFsCache(filePath) after the atomic rename in
writeMCPConfigFile so subsequent loadCapability reads see fresh
content.
2026-02-28 05:24:49 +01:00
..
2026-02-22 11:01:11 +01:00