We raised $3M for agent-native runners

Restore compatible Python environments

Restore the resolved virtual environment and keep the install step after it.

How OpenAI used this technique

Read what OpenAI changed and follow the original sources.

Restore compatible Python environments

The Python SDK added a virtual-environment cache to three jobs, keyed by operating system, architecture, resolved Python version and both lockfiles, with dependency sync still running after the restore. The repository now uses uv's built-in cache (openai/openai-python#3653).

Environment cache keyed by OS, architecture, Python version and lockfiles Source

Repository moved to uv, with uv's built-in cache in CI Source

Use it when
Dependency installation repeats on fresh CI runners despite unchanged interpreter and lockfiles.
Before applying it
Virtual environments can hold interpreter-specific paths and binaries. Key on everything that changes them, and keep the install step so a stale cache is repaired.

Company Playbooks