fix(agent): log all unit state changes