The CI Challenge: save 10% or get $1,000

Retain idle database workers across command cases

Keep idle database workers alive between test cases, so each case skips restarting workers that hold loaded code.

How OpenClaw used this technique

Read what OpenClaw changed and follow the original sources.

Retain idle database workers across command cases

Keeping safe idle workers avoids repeated process startup between test cases.

One local before-and-after pair on a busy macOS arm64 host measured Codex command case execution falling from 174.152 seconds to 97.131 seconds. Source

Use it when
A test file closes the whole database runtime after each case, restarting workers that could keep their loaded code.
Before applying it
Each case still gets a fresh state directory and database, and a final hook must close the retained workers. Peak memory can rise slightly while worker counts stay bounded.

Company Playbooks