Run the sandbox check
--incompatible_sandbox_hermetic_tmp requires Bazel 7 or later. It’s the default from Bazel 8.
Run the hermetic sandbox check
The first check still mounts/usr and /lib read-only, so actions that use host system libraries or a host compiler pass it. This run hides them:
--experimental_use_hermetic_linux_sandbox exposes only declared inputs to each action. Every failure names something that the build must declare or that the remote execution image must provide. Expect failures from auto-detected host toolchains, such as the default C++ toolchain. A hermetic toolchain removes them.
Fix the common failures
To find actions that produce different outputs between builds, compare the execution logs of two clean builds with execlog-diff. Non-deterministic actions cause remote cache misses, but they don’t fail under remote execution.

