Summary
Open Cowork Windows installer version 3.3.0-beta.1 fails to start due to incomplete database initialization. Only the sessions table is created, but the messages table is
missing.
Environment
- OS: Windows 11 Pro 10.0.22621
- App Version: 3.3.0-beta.1
- Electron Version: 31.7.7
- Node Version: v20.18.0
- Installation Type: Windows Installer (Open Cowork.exe)
Steps to Reproduce
- Install Open Cowork using the Windows installer
- Launch Open Cowork.exe
- Application fails to start with error popup
Error Log
[ERROR] [Database] Schema initialization failed: {
"name": "SqliteError",
"message": "no such table: messages",
"stack": "SqliteError: no such table: messages
at Database.exec (C:\Program Files\Open Cowork\resources\app.asar\node_modules\better-sqlite3\lib\methods\wrappers.js:9:14)
at aR (C:\Program Files\Open Cowork\resources\app.asar\dist-electron\main\index-DUf2hfWR.js:107:196)
..."
}
Root Cause Analysis
After deleting cowork.db and restarting, the app only creates the sessions table. The messages, trace_steps, memory_entries, and skills tables are not created during
initialization.
The initializeSchema() function in src/main/db/database.ts should create all tables, but something interrupts the process after the sessions table is created.
Workaround
Manually creating the missing tables fixes the issue:
CREATE TABLE IF NOT EXISTS messages (...);
CREATE TABLE IF NOT EXISTS trace_steps (...);
CREATE TABLE IF NOT EXISTS memory_entries (...);
CREATE TABLE IF NOT EXISTS skills (...);
-- plus indexes
After manual table creation, the app starts successfully.
Expected Behavior
All required tables should be created during database initialization on first startup.
Actual Behavior
Only sessions table is created; other tables are missing, causing startup failure.
Summary
Open Cowork Windows installer version 3.3.0-beta.1 fails to start due to incomplete database initialization. Only the sessions table is created, but the messages table is
missing.
Environment
Steps to Reproduce
Error Log
[ERROR] [Database] Schema initialization failed: {
"name": "SqliteError",
"message": "no such table: messages",
"stack": "SqliteError: no such table: messages
at Database.exec (C:\Program Files\Open Cowork\resources\app.asar\node_modules\better-sqlite3\lib\methods\wrappers.js:9:14)
at aR (C:\Program Files\Open Cowork\resources\app.asar\dist-electron\main\index-DUf2hfWR.js:107:196)
..."
}
Root Cause Analysis
After deleting cowork.db and restarting, the app only creates the sessions table. The messages, trace_steps, memory_entries, and skills tables are not created during
initialization.
The initializeSchema() function in src/main/db/database.ts should create all tables, but something interrupts the process after the sessions table is created.
Workaround
Manually creating the missing tables fixes the issue:
CREATE TABLE IF NOT EXISTS messages (...);
CREATE TABLE IF NOT EXISTS trace_steps (...);
CREATE TABLE IF NOT EXISTS memory_entries (...);
CREATE TABLE IF NOT EXISTS skills (...);
-- plus indexes
After manual table creation, the app starts successfully.
Expected Behavior
All required tables should be created during database initialization on first startup.
Actual Behavior
Only sessions table is created; other tables are missing, causing startup failure.