From d910b219346c2f9096a9bfcb68268b0ad5ae719e Mon Sep 17 00:00:00 2001 From: Charles Packer Date: Sat, 17 Jan 2026 22:26:14 -0800 Subject: [PATCH] chore: remove LAZY RECOVERY debug logging (#582) Co-authored-by: Letta --- src/cli/App.tsx | 62 ++----------------------------------------------- 1 file changed, 2 insertions(+), 60 deletions(-) diff --git a/src/cli/App.tsx b/src/cli/App.tsx index d65591d..b025fda 100644 --- a/src/cli/App.tsx +++ b/src/cli/App.tsx @@ -2579,19 +2579,6 @@ export default function App({ ) { llmApiErrorRetriesRef.current += 1; - // Log for debugging (visible in transcripts) - const statusId = uid("status"); - buffersRef.current.byId.set(statusId, { - kind: "status", - id: statusId, - lines: [ - "[LAZY RECOVERY] Detected CONFLICT: server has pending approval", - "[LAZY RECOVERY] Fetching stale approvals to auto-deny...", - ], - }); - buffersRef.current.order.push(statusId); - refreshDerived(); - try { // Fetch pending approvals and auto-deny them const client = await getClient(); @@ -2600,22 +2587,6 @@ export default function App({ await getResumeData(client, agent, conversationIdRef.current); if (existingApprovals && existingApprovals.length > 0) { - // Update status with details - buffersRef.current.byId.set(statusId, { - kind: "status", - id: statusId, - lines: [ - "[LAZY RECOVERY] Detected CONFLICT: server has pending approval", - `[LAZY RECOVERY] Found ${existingApprovals.length} stale approval(s):`, - ...existingApprovals.map( - (a) => - ` - ${a.toolName} (${a.toolCallId.slice(0, 8)}...)`, - ), - "[LAZY RECOVERY] Auto-denying and batching with user message...", - ], - }); - refreshDerived(); - // Create denial results for all stale approvals // Use the same format as handleCancelApprovals (lines 6390-6395) const denialResults = existingApprovals.map((approval) => ({ @@ -2632,41 +2603,12 @@ export default function App({ approvals: denialResults, }; currentInput.unshift(approvalPayload); - } else { - // No approvals found - server state may have cleared - buffersRef.current.byId.set(statusId, { - kind: "status", - id: statusId, - lines: [ - "[LAZY RECOVERY] Detected CONFLICT but no pending approvals found", - "[LAZY RECOVERY] Retrying message...", - ], - }); - refreshDerived(); } - } catch (_recoveryError) { + // else: No approvals found - server state may have cleared, just retry + } catch { // If we can't fetch approvals, just retry the original message - buffersRef.current.byId.set(statusId, { - kind: "status", - id: statusId, - lines: [ - "[LAZY RECOVERY] Failed to fetch pending approvals", - "[LAZY RECOVERY] Retrying message anyway...", - ], - }); - refreshDerived(); } - // Brief pause so user can see the status - await new Promise((resolve) => setTimeout(resolve, 500)); - - // Remove the transient status - buffersRef.current.byId.delete(statusId); - buffersRef.current.order = buffersRef.current.order.filter( - (id) => id !== statusId, - ); - refreshDerived(); - // Reset interrupted flag so retry stream chunks are processed buffersRef.current.interrupted = false; continue;