It seems that action_env isn't included in ctx.configuration.default_shell_env as per the issue detailed here bazelbuild/bazel#12049.
This means that we can't propagate e.g. LIBRARY_PATH or LD_LIBRARY_PATH which is needed to support some mpi compiler wrappers e.g. with Intel MPI when compiling mpi4py.