The sentence in question is:
相手の話の途中で話を始めるくせがあると、人に言われてはじめて気がついた。
I understand the meaning of this sentence as "I noticed my habit of interrupting people until someone told me", my question is, the と particle, what function is it playing here? is it a shortened という? It doesn't seem to be the usual "when X then Y" or "AND".
相手の話の途中で話を始めるくせがあると気がついた。人に言われて is inserted as an adverbial clause, along with the adverb はじめて. It is not impossible to think that this と goes with 言われて. In fact, that was what the speaker was told, of course. However, the sentence would most probably be written相手の話の途中で話を始めるくせがあると人に言われて、はじめて気がついた。in that case. And this sentence seems to lack information about what the speaker noticed as a result of having been told that by other people. It would sound more natural to say something like相手の話の途中で話を始めるくせがあると人に言われて、はじめてそのことに気がついた。– aguijonazo Oct 17 '21 at 07:03