Have the LocalBackend lock the state during operations, and enble this for the apply comand.
The local backend implementation is an implementation of backend.Enhanced that recreates all the behavior of the CLI but through the backend interface.