earendil-works/pi · error · SessionError
invalid_entry
invalid_entry
Error message
Invalid SQLite session entry ${row.id}: failed to decode entry ${row.id} What it means
Error "Invalid SQLite session entry ${row.id}: failed to decode entry ${row.id}" thrown in earendil-works/pi.
Source
Thrown at packages/session-backends/sqlite-node/src/sqlite/repo.ts:260
type: "branch_summary",
fromId: payload.fromId,
summary: payload.summary,
...(Object.hasOwn(payload, "details") ? { details: payload.details } : {}),
...(Object.hasOwn(payload, "usage")
? { usage: payload.usage as Extract<Entry, { type: "branch_summary" }>["usage"] }
: {}),
};
case "custom":
if (typeof payload.customType !== "string") throw new Error("Invalid custom payload");
return {
...base,
type: "custom",
customType: payload.customType,
...(Object.hasOwn(payload, "data") ? { data: payload.data } : {}),
};
}
} catch (error) {
throw new SessionError(
"invalid_entry",
`Invalid SQLite session entry ${row.id}: failed to decode entry ${row.id}`,
error instanceof Error ? error : undefined,
);
}
}
function recordRunId(record: NewRecord): string | undefined {
return record.type === "operation_started" ? record.id : "runId" in record ? record.runId : undefined;
}
function recordOpKind(record: NewRecord): string | undefined {
return record.type === "operation_started" ? record.intent.kind : undefined;
}
function decodeRecord(row: { seq: number; timestamp: number; payload: string }): LaneRecord {
try {
return {View on GitHub (pinned to 4af9d21d3b)
Solutions
- The stored entry failed to decode; the database row is corrupt or from an incompatible version.
When it happens
Trigger: Thrown at packages/session-backends/sqlite-node/src/sqlite/repo.ts:260 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
AI-assisted analysis of earendil-works/pi@4af9d21d3b (2026-08-24).
Data as JSON: /api/errors/c41201227bc5b992.
Report an issue: GitHub.