From 2bcfda46c5515c1358a58fa2f2bcc902c6772798 Mon Sep 17 00:00:00 2001 From: Sarah Wooders Date: Wed, 28 Jan 2026 23:30:43 -0800 Subject: [PATCH] Add debug logging for session init, increase timeout to 30s --- src/core/bot.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/bot.ts b/src/core/bot.ts index 02fb6d6..aa4ad56 100644 --- a/src/core/bot.ts +++ b/src/core/bot.ts @@ -211,7 +211,11 @@ export class LettaBot { } // Initialize session explicitly (so we can log timing/failures) - const initTimeoutMs = 15000; + console.log('[Bot] About to initialize session...'); + console.log('[Bot] LETTA_API_KEY in env:', process.env.LETTA_API_KEY ? `${process.env.LETTA_API_KEY.slice(0, 30)}...` : 'NOT SET'); + console.log('[Bot] LETTA_CLI_PATH:', process.env.LETTA_CLI_PATH || 'not set (will use default)'); + + const initTimeoutMs = 30000; // Increased to 30s const withTimeout = async (promise: Promise, label: string): Promise => { let timeoutId: NodeJS.Timeout; const timeoutPromise = new Promise((_, reject) => {