From your symptom description, this sounds like a fairly common Rear Tonneau Position sensor problem, though there are several other things that can cause what you describe.
The previously described "hooks" are alignment/securing latches for the folding top. When the folding top is properly aligned, they lock down the rear portion of the folding top firmly to the car's chassis. (The front is secured by a cinch mechanism in the center of the windshield and two alignment pins on either side of the windshield. How "tight" the top sits on the rear latches is controlled by the twin hydraulic pistons that move the folding top.
Unless the problem fixes itself, (and they rarely do) you'll need to have your top scanned by a dealer and adjusted if necessary. Unless a sensor is bad, (or intermittent) a re-learn of the three folding top sensors usually clears up the problem. If a sensor is not maintaining it's position count over time, (slow, agonizing sensor death) either mechanically or electrically, a re-learn is only a temporary fix and the sensor will eventually need replacement.
Please let us know what caused the problem when you have it corrected.
CCC