feat(agent): log the source of a command state transition