Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions Releases/v5.0.0/.claude/PAI/PULSE/modules/telegram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,13 @@ CRITICAL RULES FOR TELEGRAM MODE:
},
}

// Resume previous session for context continuity
if (lastSessionId) {
sdkOptions.resume = lastSessionId
}

// Intentionally NOT passing `resume: lastSessionId`. The in-prompt
// history block above already carries the last-10 exchanges of context;
// passing `resume` on top of that double-books conversation state and
// saturates the SDK session after a few turns — at which point query()
// short-circuits with numTurns:0 / cost:0 / empty result, producing the
// user-visible "Sorry, I wasn't able to generate a response" fallback.
// `lastSessionId` is still tracked below for log correlation only.
const conversation = query({ prompt, options: sdkOptions as any })

// Collect response with timeout
Expand Down