We raised $3M for agent-native runners

Precompile repeated imports in disposable test copies

Compile repeated imports once per test shard when every test subprocess runs with bytecode writes off.

How OpenAI used this technique

Read what OpenAI changed and follow the original sources.

Precompile repeated imports in disposable test copies

Codex Security runs compileall with checked hashes on each shard's disposable copy of the package. Release artifacts keep the original archive, and the isolated subprocesses keep their no-write flags.

Paired local Linux run of the 43 scan-resume cases: 451.7s to 381.7s, plus 1.1s of preparation Source

Use it when
Tests launch many isolated interpreters with bytecode writes disabled.
Before applying it
Generated bytecode stays out of release artifacts. Hash-based invalidation, interpreter compatibility and the real no-write tests remain necessary.

Company Playbooks