But you can (and should) ask if you're being detained on suspicion of a specific (criminal) offense, or not (e.g. officer wants to doublecheck your story, or background, or thinks there are irregularities), or (esp. for non-citizen) refusing to consent to unlocking your devices.

The answer to the above should give you some idea what's likely to happen, and what CBP has flagged you for, if anything.