From 9642f0b7e75a22da1ae472096466a2d2491af9ff Mon Sep 17 00:00:00 2001 From: Ajax Davis Date: Mon, 15 Dec 2025 12:36:26 +1000 Subject: [PATCH] fix: disable tool caching entirely to ensure fresh env vars Temporary fix - always re-import tools so env vars are fresh each request --- apps/railway-executor/server.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/railway-executor/server.ts b/apps/railway-executor/server.ts index 61bb33c..a47578c 100644 --- a/apps/railway-executor/server.ts +++ b/apps/railway-executor/server.ts @@ -439,8 +439,10 @@ async function executeTool(req: Request): Promise { // biome-ignore lint/suspicious/noImplicitAnyLet: Tool type is determined dynamically after import let toolModule; - // Check cache or import - if (moduleCache.has(cacheKey)) { + // CACHE DISABLED - always re-import tools to ensure fresh env vars + // TODO: Re-enable caching with smarter invalidation based on env vars + const CACHE_ENABLED = false; + if (CACHE_ENABLED && moduleCache.has(cacheKey)) { console.log(`✅ Using cached tool: ${cacheKey}`); toolModule = moduleCache.get(cacheKey); } else {