The optimal thing would be to have Omega think that you will one-box, but you actually two box. You’d love to play Omega for a fool, but the problem explicitly tells you that you can’t, and that Omega can somehow predict you.
Omega has extremely good predictions. if you’ve set your algorithm in such a state that Omega will predict that you one-box, you will be unable to do anything but one-box—your neurons are set in place, causal lines have already insured your decision, and free will doesn’t exist in the sense that you can change your decision after the fact.
Isn’t that the point, though? Hasn’t that been the theme? That reality doesn’t care about the narrative arcs that you make in your head? That at any time, the universe is allowed to kill you, your notion of the plot be damned? What you are feeling seems to be more or less the author’s intention—the sign of a good story.
Mind you, if this was the real world. Harry would have found out about Hermione’s death 2-3 days later, not dramatically just in time. From a realism perspective, there was way more closure than anyone ever actually gets when it comes to violent death.