{"record":{"id":"c56b1e53545f1b35","repo":"nanocoai/nanoclaw","slug":"failed-to-clear-orphan-processing-claims","errorCode":null,"errorMessage":"Failed to clear orphan processing claims","messagePattern":"Failed to clear orphan processing claims","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/host-sweep.ts","lineNumber":352,"sourceCode":"        messageId: msg.id,\n        tries: msg.tries,\n        backoffMs,\n        reason,\n      });\n    }\n  }\n\n  // Drop the orphan 'processing' rows. Without this, the next sweep tick\n  // would re-read them, see the old status_changed timestamp, conclude the\n  // freshly respawned container is stuck, and SIGKILL it before its\n  // agent-runner has a chance to run clearStaleProcessingAcks() on startup.\n  try {\n    const cleared = outDb.deleteOrphanProcessingClaims();\n    if (cleared > 0) {\n      log.info('Cleared orphan processing claims', { sessionId: session.id, cleared, reason });\n    }\n  } catch (err) {\n    log.warn('Failed to clear orphan processing claims', { sessionId: session.id, err });\n  }\n}\n","sourceCodeStart":334,"sourceCodeEnd":355,"githubUrl":"https://github.com/nanocoai/nanoclaw/blob/294ef2aee85218b23ad30eda9dfe10e590b54a8c/src/host-sweep.ts#L334-L355","documentation":"The 60s sweep failed to delete orphan processing_ack claims in a session's outbound.db. Stale claims can make the host consider the session 'processing' when it isn't, delaying wakeups until a later successful sweep.","triggerScenarios":"outDb.deleteOrphanProcessingClaims() throws — SQLite I/O error, DB locked by the container writing concurrently, or a cross-mount visibility hiccup.","commonSituations":"Container mid-write during the sweep (lock contention), disk issues, or a session directory removed while sweeping.","solutions":["Usually self-heals on the next 60s sweep — wait one cycle first","If persistent, check the session DB isn't locked: inspect data/v2-sessions/<group>/<session>/outbound.db with a quick read query","Verify the session directory exists and the mount is healthy"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { outDb.deleteOrphanProcessingClaims(); } catch { /* retried on next 60s sweep */ }","preventionTips":["Avoid external writes to outbound.db (single-writer rule)","Expect lock contention while containers run; rely on sweep retry","Alert only if the warning persists across multiple sweeps"],"tags":["sqlite","host-sweep","processing-ack","locking"],"backgroundTag":"sqlite-database-locked","analyzedSha":"294ef2aee85218b23ad30eda9dfe10e590b54a8c","analyzedAt":"2026-08-28T13:59:10.357Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}