Repository navigation
Description
What happened
We encountered three interrelated runtime and lifecycle issues while using enowX on Windows 11:
1. Silent execution termination caused by SQLite lock timeout
During multi-step agent executions (such as builds or when orchestrated alongside GOA), the session abruptly halts midway with zero error notifications or banners in the UI. The cursor simply returns to the prompt input.
Looking into the logs reveals that the failure stems from a concurrent database lock timeout (SQLiteError: database is locked) inside SessionRunState.ensureRunning. The process crashes silently instead of recovering or alerting the user.
2. /clear command only clears visual scrollback, leaving token context intact
Running /clear clears the visual terminal buffer, but does not evict the session's message array or reset the token counter. The session remains bloated (e.g. at 477,773 tokens), causing subsequent prompts to send the full 477k token history to the LLM. This causes unexpected API cost and latency because the user is led to believe the session was reset.
3. Orphaned enowx-daemon.exe process after closing the application
Closing enowX via the window close button [X] leaves enowx-daemon.exe running in the background. It continues holding locks on session SQLite databases and IPC sockets, causing connection lag or immediate database lock errors when enowX is launched again.
Steps to reproduce
- To reproduce silent halt: Run a worker session performing multi-step tasks while GOA or another tab monitors the session state, or when context size is large. The agent terminates execution abruptly mid-turn.
- To reproduce uncleared tokens: Type
/clearin an active session with large token history. Notice the visual screen is wiped, but the right-hand panel and status bar still show hundreds of thousands of tokens (Context: 477k tokens), which persist on next prompt. - To reproduce orphaned daemon: Start a session, close enowX via the window [X] button, then check Task Manager.
enowx-daemon.exeis still actively running in the background.
enowX version
0.7.0
Where the session ran
This device
Operating systems
Windows 11 x64
Agent and its version
OpenCode 1.18.35
Logs
[Log Trace from .local/share/opencode/log/opencode.log]:
level=ERROR run=1f4c7516 message=failed ref=err_81de53b1
error="effect/sql/SqlError: Failed to execute statement (cause: effect/sql/SqlError/LockTimeoutError: Failed to execute statement (cause: SQLiteError: database is locked))"
cause="effect/sql/SqlError: Failed to execute statement
at <anonymous> (B:/~BUN/root/chunk-z1ernwvb.js:54:29098)
at runLoop (B:/~BUN/root/chunk-v051119f.js:25:2045)
at evaluate (B:/~BUN/root/chunk-v051119f.js:25:1435)
at Session.updateMessage (B:/~BUN/root/chunk-k0dn1q0w.js:21:9866)
at SessionPrompt.createUserMessage (B:/~BUN/root/chunk-bevzdgga.js:1142:9959)
at SessionPrompt.run (B:/~BUN/root/chunk-bevzdgga.js:1142:15339)
at SessionRunState.ensureRunning (B:/~BUN/root/chunk-bevzdgga.js:1142:15308)
at SessionPrompt.loop (B:/~BUN/root/chunk-bevzdgga.js:1142:10225) {
[cause]: effect/sql/SqlError/LockTimeoutError: Failed to execute statement
[cause]: SQLiteError: database is locked
}"
Activity
Merge pull request #48 from enowdev/release/v0.7.1-fixes
Read OpenCode's database briefly, and only while it runs