Agreement reached restoring oversight powers for comptroller’s office