Skip to content

Commit 2e2e99f

Browse files
voidcraft-devclaude
andcommitted
fix: OpenCode sessions empty — SQLite OFFSET without LIMIT is syntax error
OFFSET requires LIMIT in SQLite. When session_service passes limit=None to load all sessions for archive filtering, the generated SQL "ORDER BY ... OFFSET 0" silently fails. Fix: use LIMIT -1 OFFSET n. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0811fac commit 2e2e99f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src-tauri/src/platforms/opencode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl super::PlatformAdapter for OpenCodePlatform {
4646
l, offset
4747
),
4848
None => format!(
49-
"SELECT id, title, directory, time_updated FROM session ORDER BY time_updated DESC OFFSET {}",
49+
"SELECT id, title, directory, time_updated FROM session ORDER BY time_updated DESC LIMIT -1 OFFSET {}",
5050
offset
5151
),
5252
};

0 commit comments

Comments
 (0)