polygram 0.12.0-rc.11 → 0.12.0-rc.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/handlers/dispatcher.js +23 -0
- package/package.json +1 -1
|
@@ -224,6 +224,29 @@ function createDispatcher({
|
|
|
224
224
|
chat_id: chatId, session_key: sessionKey, msg_id: msg.message_id,
|
|
225
225
|
error: resumeErr?.message?.slice(0, 200),
|
|
226
226
|
});
|
|
227
|
+
// Music topic incident (2026-06-01): a channels session whose
|
|
228
|
+
// context grew large enough to auto-/compact on resume loses its
|
|
229
|
+
// MCP bridge binding on EVERY resume ("no MCP server configured"),
|
|
230
|
+
// so the resumed turn re-detaches (BRIDGE_DISCONNECTED) and lands
|
|
231
|
+
// here. The persisted claude_session_id is then poisoned — every
|
|
232
|
+
// future message (manual resend OR post-cooldown auto-resume)
|
|
233
|
+
// re-resumes it and re-detaches, an endless "🔌 please resend"
|
|
234
|
+
// loop. Break it: drop the session row so the NEXT message spawns
|
|
235
|
+
// a FRESH session (no --resume). Gated on the ORIGINAL error being
|
|
236
|
+
// a bridge-detach AND auto-resume having failed — a one-off bridge
|
|
237
|
+
// crash that resumes cleanly takes the .then() path above and
|
|
238
|
+
// keeps its context; only a session that re-detaches on resume is
|
|
239
|
+
// treated as poison. We lose the poisoned conversation's history,
|
|
240
|
+
// but that session can't complete a turn anyway.
|
|
241
|
+
if (err.code === 'BRIDGE_DISCONNECTED' && typeof db.clearSessionId === 'function') {
|
|
242
|
+
dbWrite(
|
|
243
|
+
() => db.clearSessionId(sessionKey),
|
|
244
|
+
'clearSessionId: poisoned by bridge-detach on resume',
|
|
245
|
+
);
|
|
246
|
+
logEvent('session-reset-after-bridge-detach', {
|
|
247
|
+
chat_id: chatId, session_key: sessionKey, msg_id: msg.message_id,
|
|
248
|
+
});
|
|
249
|
+
}
|
|
227
250
|
const fallbackText = errorReplyText(err);
|
|
228
251
|
if (fallbackText) {
|
|
229
252
|
tg(bot, 'sendMessage', {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polygram",
|
|
3
|
-
"version": "0.12.0-rc.
|
|
3
|
+
"version": "0.12.0-rc.12",
|
|
4
4
|
"description": "Telegram daemon for Claude Code that preserves the OpenClaw per-chat session model. Migration path for OpenClaw users moving to Claude Code.",
|
|
5
5
|
"main": "lib/ipc/client.js",
|
|
6
6
|
"bin": {
|