No fallback to bare mode for summary generation - #1026
Conversation
Analysis: No Fallback to Bare Mode for Session Summary GenerationRoot CauseThe bug is a gap in the bare-mode auth-error fallback inside How the fallback mechanism works
The auth error regex at line 425: const isAuthError = /not logged in|unauthorized|authentication|invalid api key|Could not resolve credentials/i.test(rawErrorMessage)This correctly matches the user's error ( Why session summary generation bypasses the fallbackThe session summary flow (
// Line 446-453: Inner retry throws directly, bypassing outer auth-error fallback
try {
return await runHeadlessSubprocess(resumeArgs, env)
} catch (retryError) {
// ← Auth error caught here, thrown immediately
throw new Error(`Claude CLI error: ${redactSettings(retryErrorMessage)}`)
}Secondary issue: Epic report generation
Affected Files
How the fix should workThe session-in-use inner retry (lines 432-454) needs to check for auth errors and Alternatively, the inner retry could be restructured so auth errors from the Questions & Assumptions
|
Implementation PlanProblem SummaryWhen Additionally, Root CauseThe headless retry loop structure (lines 405-458) has the auth-error check at lines 424-429, but the session-in-use handler at lines 432-454 is nested within the same catch block. When a session-in-use error occurs:
Phase 1: Fix the session-in-use inner retry to check for auth errorsFile:
|
Implementation CompleteSummaryAdded bare-mode auth-error fallback to the session-in-use Changes Made
Validation Results
Detailed Changes by File (click to expand)src/utils/claude.tsChanges: Auth-error fallback in session-in-use retry path
src/lib/SessionSummaryService.tsChanges: Epic report missing option
src/utils/claude.test.tsChanges: New test cases
src/lib/SessionSummaryService.test.tsChanges: Updated existing test expectation
|
f84b4a5 to
5d02238
Compare
iloom Session SummaryKey Themes:
Session Details (click to expand)Key Insights
Decisions Made
Challenges Resolved
Lessons Learned
Generated with 🤖❤️ by iloom.ai |
Fixes #1022
No fallback to bare mode for summary generation
Issue details
My organization recently switched over to Enterprise Accounts and And now the session summary always fails because of the bare flag isn't compatible. In other steps, there is a fallback, but not for the session summary generation.
This PR was created automatically by iloom.