So there are perhaps two angles to this question:
- What's the first literal claim of 'I Am' = 'Yahweh' in reference to this verse?
- How early was this understood as a claim to divinity?
I introduce the second angle because of your follow-up comment that expresses that view that prior to evidence including a clear direct link to 'YHWH', this passage would not be a claim of divinity otherwise. Due to the weight of the historic evidence, I will therefore treat them in reverse order, for sequential order sake. So we'll get to the core question eventually, but that's not to say that the passage was commonly understood in any other way before that point.
How early was this understood as a claim to divinity?
This seems to be the uniform perspective of the early church:
The sacred books acknowledge with regard to Christ, that as He is the
Son of man, so is the same Being not a [mere] man; and as He is flesh,
so is He also spirit, and the Word of God, and God. And as He was born
of Mary in the last times, so did He also proceed from God as the
First-begotten of every creature; and as He hungered, so did He
satisfy [others]; and as He thirsted, so did He of old cause the Jews
to drink, for the Rock was Christ Himself: thus
does Jesus now give to His believing people power to drink spiritual
waters, which spring up to life eternal. And as He was the
son of David, so was He also the Lord of David. And as He was from
Abraham, so did He also exist before Abraham. And as He was
the servant of God, so is He the Son of God, and Lord of the universe.
Origen doesn't state the equivalence outright, but at least had a known capability in Hebrew which adds significance to his own exegesis of the passage:
We worship one God, the Father and the Son, therefore, as we have
explained; and our argument against the worship of other gods still
continues valid. And we do not reverence beyond measure one who has
but lately appeared, as though He did not exist before; for we believe
Himself when He says, Before Abraham was, I am. Again He says, I am
the truth; and surely none of us is so simple as to suppose that truth
did not exist before the time when Christ appeared. We worship,
therefore, the Father of truth, and the Son, who is the truth; and
these, while they are two, considered as persons or subsistences, are
one in unity of thought, in harmony and in identity of will. So
entirely are they one, that he who has seen the Son, who is the
brightness of God's glory, and the express image of His person, has
seen in Him who is the image of God, God Himself.
He proves Himself to be God by offering divinity, which if He were not
God He could not give. If Christ was only man, how did He say, Before
Abraham was, I Am? For no man can be before Him from whom he himself
is; nor can it be that any one should have been prior to him of whom
he himself has taken his origin. And yet Christ, although He is born
of Abraham, says that He is before Abraham. Either, therefore, He says
what is not true, and deceives, if He was not before Abraham, seeing
that He was of Abraham; or He does not deceive, if He is also God, and
was before Abraham.
What's the first literal claim of 'I Am' = 'Yahweh' in reference to this verse?
We're disadvantaged in this because most of the early church fathers (Origen a noteworthy exception!) did not evidence an interest or understanding of Hebrew, and seemed to use the word 'Lord' whenever quoting the Tanakh just as their Jewish counterparts did. Widespread use of the LXX meant that there just wasn't much evident interest in the Hebrew text at this point. And so it's difficult to be sure many of them even understood that 'I Am' had 'Yahweh' as a Hebrew equivalence.
The first instance I would call a certain reference would probably go to John Chrysostom in his Homily 8 on John (347-407AD) - this is merely an extract, but if you continue to read from this point you'll see an extensive and precise argument on this point:
But wherefore said He not, Before Abraham was, I was, instead of I Am?
As the Father uses this expression, I Am, so also does Christ; for it
signifies continuous Being, irrespective of all time. On which account
the expression seemed to them to be blasphemous . Now if they could
not bear the comparison with Abraham, although this was but a trifling
one, had He continually made Himself equal to the Father, would they
ever have ceased casting stones at Him?