When the Build Outgrows the Computer: Bazel and BuildBuddy
Codex Patched prepares source on the working computer while Bazel, graph analysis, compilation, and linking run on a BuildBuddy cloud runner. If the runner is unavailable, the workflow does not automatically build locally.
A remote cache stores results, remote execution runs actions, and a cloud runner moves Bazel itself. If analysis exhausts local memory, cache or remote executors alone are insufficient: Bazel itself still runs on the working computer.
Run the required build
- Pin the upstream version, patch, and changed component sources.
- Submit the selected target and keep the invocation link.
- Wait for successful completion and published artifacts.
- Download the result and verify its provenance, manifest, and checksums. Proceed to installation afterward.
These repository commands require a prepared environment and configured access:
tools/build-codex-release
tools/build-native-bazel statusline
tools/cloud-build-status <invocation-id>
tools/fetch-cloud-artifacts <invocation-id> core
The first two start cloud builds, the third reads status, and the fourth imports an artifact. API acceptance does not mean a file is ready; downloading alone does not activate a version.
Reduce repeated work
The CLI, native host, manager, and capability libraries have separate targets. A compatible library change can build independently; an ABI or contract change requires rebuilding the affected host.
Unchanged code mode host, exec server, and resources come from a pinned official OpenAI package with provenance and hash checks.
Bazel reuses a result when an action’s significant inputs match. Compiler, flags, platform, and dependency changes affect its cache identity. Compare fast and LTO profiles separately. Verify savings in an actual repeated-run log, not only the dependency graph.
Check the cost of moving builds
Separate environment preparation, analysis, queueing, execution, and file transfer time. A cold environment, network, or sequential linking can erase cache benefits. Measure speedups using the same profile and a known source change.
Declare tool versions and all inputs: an accidental PATH dependency or manually installed library breaks reproducibility. Pass tokens through the runner’s secret mechanism, not public commands or logs. Account for resource costs before increasing capacity.
Documentation: Bazel remote execution, caching, rule requirements, BuildBuddy runner, BuildBuddy RBE.