Merge "Checkpoint staged session when state changes."