Skip to content

v0.3.2

Latest

Choose a tag to compare

@Kevin7Qi Kevin7Qi released this 05 Aug 04:09
· 36 commits to main since this release

Fixes an intermittent startup failure

Runs could fail with failed to initialize sqlite state runtime under ~/.codex when one Codex app server started while another was still initializing. Codex holds an exclusive lock on its shared SQLite state during startup, so two starting at once meant one of them died.

Three changes close it, one per way the collision arises:

  • App server startups now serialize per CODEX_HOME.
  • A race lost to an app server codex-collab does not control — an editor session, the Codex TUI — is retried once.
  • The broker no longer abandons an app server mid-initialization, which used to leave the SQLite state locked indefinitely.

Startup failures now also explain themselves: a locked state directory, an unwritable one, and a damaged database produce different messages, each saying what to do next, instead of the bare "App server process exited unexpectedly".

Behaviour changes

  • Startups serialize per CODEX_HOME. Concurrent invocations queue for the initialization step, which measures 260–860ms depending on the size of the state directory. Turns are unaffected. The lock fails open — if it cannot be acquired the invocation proceeds and behaves as it does today.
  • Broker readiness now waits 30s (was 10s), overridable with CODEX_COLLAB_BROKER_READY_TIMEOUT_MS. Giving up sooner achieved nothing: the direct connection that follows pays the same startup cost, and starting it early is what produced the collision. The wait still ends the moment the broker process exits.

Also in this release

  • health reports Codex authentication state.
  • model/list and account/read are served during an active stream instead of failing.
  • The CLI surfaces the server's typed error classification.
  • run -d is carried into the detached-run hints, and a thread-ID miss names the workspace it searched.
  • Unindexed non-UUID thread IDs are rejected instead of reporting success.
  • Terminating a process tree now reaches descendants that outlive their group leader.
  • The broker suite runs on Windows for the first time, and suites that skip themselves now say so out loud rather than reporting a pass they did not earn.

Verification

797 tests, 0 failures on Ubuntu, Windows and macOS.