Resolving "could not unmarshal static run environment file: invalid vendor" error in Spacelift
Last updated: October 28, 2026
When using Spacelift Templates with a Kubernetes worker pool, you may encounter the following error during the workspace preparation phase of a run:
could not populate workspace: could not unmarshal static run environment file: invalid vendor: <number>This error typically indicates that the launcher image used by your Kubernetes worker pool is outdated and does not support the vendor configuration defined in your template (for example, a newer version of OpenTofu).
How to diagnose the issue
To confirm whether your worker pool is running a stale launcher image, run the following commands:
kubectl get workerpools -A -o yaml | grep -i -A2 launcherImagehelm list -n spacelift-worker-controller-systemIf you maintain your own mirror of the launcher image, check that the mirrored version matches the latest release. An outdated mirror is a common cause of this error.
You can also inspect the image being used by the failing run's pod immediately after the failure occurs:
kubectl get pods -A -l "workers.spacelift.io/run-id=<run-id>" -o jsonpath='{..image}'How to resolve the issue
Update your Kubernetes worker pool's launcher image to the latest version.
If you use a private mirror of the launcher image, ensure the mirrored image is up to date.
Re-run the failed stack after updating the image.
Additional note on manage_state: false
If your vendor configuration uses manage_state: false, make sure your Terraform/OpenTofu code includes its own backend configuration. If no backend is configured, the run will fail at the init phase. Alternatively, you can use the nobackend label on your stack to avoid this requirement.