In books on generative syntax it is often said that LF itself becomes an input to the so-called syntax-semantics interface to satisfy some conditions (e.g. to get rid of uninterpretable values). But that happens only after spellout. Surprisingly nothing is said about how this interface might work before a sentence is generated - if we want to say "John hit Mary", we must know who is the agent and who is the patient before any generative operations happen - otherwise we might get something like "Mary hit John". Does that mean that syntax-semantics interface interacts with our "faculty of language" constantly? There still might be no clear answer so I'd like to hear your opinion.
Within the framework that grew from Chomsky's post-70s work, the answer to the question
Does that mean that syntax-semantics interface interacts with our "faculty of language" constantly?
is clearly taken to be no. Consequently, you are right that the problem of distinguishing "John hit Mary" from "Mary hit John" exists. The null hypothesis in this school of syntax could be formulated as follows.
Unless forced to by strong empirical evidence, assume that the narrow syntax of every human language is the same.
Applied to the particular problem you raise, this takes the form of the Uniform Theta-role Assignment Hypothesis (UTAH) which was first formulated in Mark Baker's 1985 thesis in the following way (in the language of X-bar theory).
Identical thematic relationships between items are represented by identical structural relationships between those items at the level of D-structure.
In plain language, this means that these people believe that thematic roles are encoded in the syntax. In a contemporary formulation, the UTAH is usually taken to mean that there exists a step in the building of narrow syntactic objects (so before spell-out) where arguments are introduced in a certain way which is characterized by structural relations only (order and position of first Merge) and which is uniform across language. The element first merged in the structural position of agent, for instance, will always be interpreted as the agent after spell-out, independently of wherever it might have landed at the end of the derivation because of movement/re-merge/etc.
The works in minimalist syntax that I'm familiar with are unanimous that this step occurs very early in the construction of the narrow syntactic object object. A majority of them believe that patients are introduced below agents (so are first merged deeper in the structure than agents) but Bowers (2010), for instance, disagrees.
To sum up, the majority of works in minimalist syntax believe that "John hit Mary" is semantically distinguished from "Mary hit John" because Mary was first merged in the deeper structural position corresponding to patient in the first sentence whereas John was first merged there in the second one. Importantly, these works believe that "Mary" and "John" are first merged in the same loci in all of the following sentences, that "Mary"'s locus is deeper than that of "John" and that this explains why "Mary" is always interpreted as patient.
John hit Mary.
Mary was hit by John.
(French) Marie, Jean l'a frappée. (Marie, Jean her have hit).
I should add, of course, that the UTAH is just the null-hypothesis. Of course, many syntactic phenomena (ergativity, experiencer verbs...) do not fit well with it and are the objects of many interesting debates (see these notes of Idan Landau for a first introduction to some of these debates).
Realize that linguistic competence (i.e. I(Internal)-language) is the object of study in generative grammar. Hence, syntactic computation consisting of Merge + Move giving rise to LF is NOT meant to model speaker externalization. Its only purpose is to compute/generate the hierarchically structured expressions which already exist in your brain.