You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SQLiteError: bad parameter or other API misuse #15221
After send prompt, I do not receive any response while opencode show progress indicator.
On opencode close
18 | }
19 | exec(query) {
20 | this.client.exec(query);
21 | }
22 | prepareQuery(query, fields, executeMethod, isResponseInArrayMode, customResultMapper) {
23 | return new PreparedQuery(this.client.prepare(query.sql), query, this.logger, fields, executeMethod, isResponseInArrayMode, customResultMapper);
^
SQLiteError: bad parameter or other API misuse
errno: 21,
byteOffset: -1,
code: "SQLITE_MISUSE"
at prepare (bun:sqlite:345:37)
at prepareQuery (../../node_modules/.bun/[email protected]+1f516382cd87cd66/node_modules/drizzle-orm/bun-sqlite/session.js:23:40)
at _prepare (../../node_modules/.bun/[email protected]+1f516382cd87cd66/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:558:71)
at all (../../node_modules/.bun/[email protected]+1f516382cd87cd66/node_modules/drizzle-orm/sqlite-core/query-builders/select.js:584:15)
at run (node:async_hooks:62:22)
at use (src/storage/db.ts:124:28)
at <anonymous> (src/session/message-v2.ts:770:27)
at process (src/session/processor.ts:393:37)
After next run it can work, or not, i do not find correct scenario.
Plugins
oh-my-opencode
OpenCode version
1.2.15
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
Ubuntu 24.04.3 LTS inside wsl2, Windows 10
Terminal
Windows Terminal
Reacted by gp27, João Marcos, skvggor, Lee B and johonas
I am experiencing the same issue. The error log and stack trace are verbatim to those posted by starsolaris.
The ui of the session freezes, but the agent starts working in background.
If I switch to other sessions and i get back to the first one, it does not update. However if i restart opencode and switch back to the previous session i can then see that session history
the issue happens only if start opencode with a folder argument: cd repos/my-project && opencode // this works fine opencode repos/my-project // this session has the problem I just described
the sqlite error seems to be just a consequence of opencode being closed while the agent was still running. If i give a very simple prompt like echo hello world and wait a few seconds, the history still doesn't get updated, but closing opencode doesn't product the error and stack trace
Activity
gp27 commentedon Mar 1, 2026
I am experiencing the same issue. The error log and stack trace are verbatim to those posted by starsolaris.
The ui of the session freezes, but the agent starts working in background.
If I switch to other sessions and i get back to the first one, it does not update. However if i restart opencode and switch back to the previous session i can then see that session history
I am on [email protected]
Updates:
cd repos/my-project && opencode// this works fineopencode repos/my-project// this session has the problem I just describedecho hello worldand wait a few seconds, the history still doesn't get updated, but closing opencode doesn't product the error and stack traceegilewski commentedon Mar 1, 2026
I have a reproduction of SQLITE_MISUSE for Linux, though it may be just half the problem from the initial comment.
Environment:
Steps:
opencodeOpencode immediately exits with exit code 0. Complete output:
I see #13633 was supposed to fix this, but something went wrong.
marcospb19 commentedon Mar 2, 2026
Same on Linux, not Windows specific.
reproduced on 1.2.10 and 1.2.15
reproduced with different models
marcospb19 commentedon Mar 2, 2026
EDIT: Sorry, problem also present in 1.2.7
FurkanDGN commentedon Mar 3, 2026
In my scenario, this issue occurred when I experienced a network connection problem.
Version: 1.2.15
github-actions commentedon Jul 4, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.