Let me recapitulate the arguments here.
Here’s the argument that foreknowledge is incompatible with freedom:
0. Suppose God is omniscient.
1. Suppose God believes X will do Y in the future.
2. Suppose X will not do Y in the future.
3. In that case, God was wrong to think X will do Y in the future.
4. Line 3 is in contradiction with line 0.
5. So we must deny line 2. X will do Y in the future.
6. So then, we conclude that if god believes X will do Y in the future, then X will do Y in the future.
7. Suppose the will of X is free with respect to whether or not X does Y.
8. Then X might do Y, and X might not do Y.
9. But from 6, we can see that if God believes X will do Y, it's not true that X might not do Y.
10. So then, if God believes X will do Y, it's not true that X might do Y and X might not do Y.
11. From lines 8 and 10, by *modus tollens*, we conclude that God doesn't believe X will do Y.
12. Line 11 contradicts line 1.
13. So we conclude that line seven is false: the will of X is not free with respect to wheteher or not X does Y.
14. So--if God is omniscient, then the will of X is not free with respect to wether or not X does Y.
The above, so far as I can tell, is the argument typically given (and given in this thread) against the compatibility of omniscience and freedom.
My response to the argument is to say that the move from line 6 to line 9 is invalid. We can’t conclude
“If God believes X will do Y, then it’s not true that X might not do Y”
from
“If God believes X will do Y, then X will do Y.”
That’s an invalid inference, and here’s my explanation as to why it’s invalid.
Suppose it’s true that if I believe the sun will rise tomorrow, then the sun will rise tomorrow. And it is true–for the sun will rise tomorrow, meaning if I believe it will rise tomorrow, it will rise tomorrow. (It will also rise if I don’t believe it, but that’s immaterial.)
So: If I believe the sun will rise, it will rise. This is true.
Yet we can’t conclude from this that if I believe the sun will rise, it’s not true that the sun might not rise tomorrow. That would be false. Just because I believe it, that doesn’t mean it might not happen.
So then, the inference from “If X believes Y will do Z, then Y will do Z” to “If X believes Y will do Z, then it’s not true that Y might not do Z” is an invalid inference. Meaning the argument above relies on an invalid inference, rendering the argument invalid.
Just because God believes people will do things only when those people really will do those things, we can’t conclude from this that those people couldn’t have possibly done anything else.
You mentioned the idea that God is the author of the story. That does yield an argument against free will. But it’s not an argument from God’s omniscience. Omniscience causes no problems for free will. If God is literally the author of all events, however, that might cause problems for free will. But this is not the topic of the thread.