The Talmud discusses a student who issues a halachic ruling in the presence of his teacher, deriving that such an act is punishable and considered a form of disrespect — an important Talmudic source for the law in YD 242:14.
תָּנָא, בְּאוֹתָהּ שָׁעָה גָּזְרוּ: תַּלְמִיד אַל יוֹרֶה אֶלָּא אִם כֵּן נוֹטֵל רְשׁוּת מֵרַבּוֹ. תַּנְחוּם בְּרֵיהּ דְּרַבִּי אַמֵּי אִיקְּלַע לְחֶתֶר. דְּרַשׁ לְהוּ: מוּתָּר לִלְתּוֹת חִיטִּין בַּפֶּסַח. אָמְרוּ לוֹ: לָאו רַבִּי מַנִּי דְּמִן צוּר אִיכָּא הָכָא? וְתַנְיָא: תַּלְמִיד אַל יוֹרֶה הֲלָכָה בִּמְקוֹם רַבּוֹ, אֶלָּא אִם כֵּן הָיָה רָחוֹק מִמֶּנּוּ שָׁלֹשׁ פַּרְסָאוֹת כְּנֶגֶד מַחֲנֵה יִשְׂרָאֵל. אָמַר לְהוּ: לָאו אַדַּעְתַּאי.
It was taught: At that time, when Rabbi Yehuda HaNasi discovered the consequences resulting from a Torah scholar who was not precise with his terminology, the Sages decreed: A Torah scholar may not teach halakha unless he receives permission from his teacher to do so. The teacher should not grant him this permission if he does not know how to express himself in a clear manner. Concerning a similar matter, the Gemara relates: Tanḥum, son of Rabbi Ami, arrived at a place called Ḥatar, and he taught them: It is permitted to wash wheat in a small amount of water in order to make it easier to peel during the grinding process on Passover, and there is no concern that perhaps it will become leavened. They said to him: Isn’t Rabbi Mani from Tyre here i.e., near our location? And it is taught in a baraita: A Torah scholar may not teach halakha in the vicinity of his teacher, unless he is distant from the teacher by at least three parasangs [parsaot], corresponding to the size of the camp of Israel. In the encampment in the wilderness no one else judged cases, as all the Jewish people brought their cases to Moses (see Exodus 33:7). Tanḥum, son of Rabbi Ami, said to them: It did not enter my mind that Rabbi Mani was in the vicinity.