Client or integration
Codex CLI
Area
Platform (Windows / macOS / Linux)
Summary
After upgrading OpenCodex from 2.10.0 to 2.10.2 on Windows with Codex CLI 0.146.0, ocx start, ocx sync, ocx stop, and ocx restore consistently report that the Codex resume history database is locked.
I expected OpenCodex to migrate/restore resume history successfully when the database is not actually locked, or to report the underlying SQLite error instead of saying the Codex app/IDE is holding the DB.
This appears to be a regression in the resume-history migration/restore logic introduced between 2.10.0 and 2.10.2. Downgrading to 2.10.0 immediately removes the warning on the same machine and Codex installation.
Reproduction
- Install OpenCodex 2.10.2:
npm install -g @bitkyc08/opencodex@2.10.2
- Confirm versions:
ocx --version
codex --version
Observed:
opencodex 2.10.2
codex 0.146.0
- Close Codex and IDEs, then run:
Observed:
⚠️ Codex resume history migration deferred: the history DB is locked (Codex app/IDE open?). It is retried automatically (while the proxy runs and on every 'ocx start'); to force it now, close the Codex app and run 'ocx sync'.
-
ocx sync reports the same warning.
-
Run:
Observed:
↩️ Codex config restored from opencodex journal. ⚠️ Codex resume history could NOT be restored — the Codex app appears to be holding the history database. Close Codex and run `ocx restore` again.
- After fully stopping the OpenCodex proxy and confirming port 10100 is no longer listening, run:
Observed:
✅ opencodex not present in Codex config. ⚠️ Codex resume history could NOT be restored — the Codex app appears to be holding the history database. Close Codex and run `ocx restore` again.
Plain `codex` now runs natively (no proxy). Switch back with: ocx restore back
- Verified there was no obvious real file lock:
- Closed Codex / IDE.
- Stopped the OpenCodex service manager.
- Terminated the remaining
bun.exe proxy listening on 127.0.0.1:10100 and its respawning parent cmd.exe.
- Confirmed nothing was listening on port 10100.
- Windows Resource Monitor showed no handle for
state_5.sqlite or logs_2.sqlite.
- Tested all relevant SQLite files with an exclusive
FileShare.None open; every file reported FREE:
.opencodex-native-main.claim.sqlite FREE
.opencodex-native-main.owner.sqlite FREE
.opencodex-native-profile.lock.sqlite FREE
goals_1.sqlite FREE
goals_1.sqlite-shm FREE
goals_1.sqlite-wal FREE
logs_2.sqlite FREE
logs_2.sqlite-shm FREE
logs_2.sqlite-wal FREE
memories_1.sqlite FREE
memories_1.sqlite-shm FREE
memories_1.sqlite-wal FREE
state_5.sqlite FREE
state_5.sqlite-shm FREE
state_5.sqlite-wal FREE
- Backed up and removed these OpenCodex coordination files while all relevant files were
FREE:
.opencodex-native-main.claim.sqlite
.opencodex-native-main.owner.sqlite
.opencodex-native-profile.lock.sqlite
ocx restore on 2.10.2 still reported the same DB-lock error.
- A/B test by downgrading to 2.10.0:
npm uninstall -g @bitkyc08/opencodex
npm install -g @bitkyc08/opencodex@2.10.0
Then:
works cleanly:
✅ opencodex not present in Codex config.
Plain `codex` now runs natively (no proxy). Switch back with: ocx restore back
And ocx start on 2.10.0 reports:
🚀 opencodex proxy running on http://localhost:10100
[opencodex] Codex runtime: C:\Users\[USER]\AppData\Roaming\npm\codex.cmd (version=0.146.0, source=configured)
- 7 models appended to Codex catalog
Pointed Codex's built-in openai provider at the opencodex proxy (openai_base_url).
Codex resume history: untouched (threads keep their native openai tag).
All models now route through opencodex proxy (like OpenRouter).
Native codex itself works normally throughout the test.
Version
Affected: 2.10.2
Working comparison: 2.10.0
Operating system
Windows, PowerShell environment.
Provider and model
Not provider-specific. Codex CLI 0.146.0 using OpenCodex routing.
Logs or error output
⚠️ Codex resume history migration deferred: the history DB is locked (Codex app/IDE open?).
⚠️ Codex resume history could NOT be restored — the Codex app appears to be holding the history database. Close Codex and run `ocx restore` again.
Screenshots and supporting files
The reproduction and exclusive-file-access results are included above. No secrets or credentials are included.
Redacted configuration
{
"proxy": "127.0.0.1:10100",
"codex_version": "0.146.0",
"affected_opencodex_version": "2.10.2",
"working_opencodex_version": "2.10.0"
}
Checks
Client or integration
Codex CLI
Area
Platform (Windows / macOS / Linux)
Summary
After upgrading OpenCodex from 2.10.0 to 2.10.2 on Windows with Codex CLI 0.146.0,
ocx start,ocx sync,ocx stop, andocx restoreconsistently report that the Codex resume history database is locked.I expected OpenCodex to migrate/restore resume history successfully when the database is not actually locked, or to report the underlying SQLite error instead of saying the Codex app/IDE is holding the DB.
This appears to be a regression in the resume-history migration/restore logic introduced between 2.10.0 and 2.10.2. Downgrading to 2.10.0 immediately removes the warning on the same machine and Codex installation.
Reproduction
Observed:
Observed:
ocx syncreports the same warning.Run:
Observed:
Observed:
bun.exeproxy listening on127.0.0.1:10100and its respawning parentcmd.exe.state_5.sqliteorlogs_2.sqlite.FileShare.Noneopen; every file reportedFREE:FREE:ocx restoreon 2.10.2 still reported the same DB-lock error.Then:
works cleanly:
And
ocx starton 2.10.0 reports:Native
codexitself works normally throughout the test.Version
Affected: 2.10.2
Working comparison: 2.10.0
Operating system
Windows, PowerShell environment.
Provider and model
Not provider-specific. Codex CLI 0.146.0 using OpenCodex routing.
Logs or error output
Screenshots and supporting files
The reproduction and exclusive-file-access results are included above. No secrets or credentials are included.
Redacted configuration
{ "proxy": "127.0.0.1:10100", "codex_version": "0.146.0", "affected_opencodex_version": "2.10.2", "working_opencodex_version": "2.10.0" }Checks