This part seems a little muddy. UTC isn't a number of seconds since an epoch, it's a number of hours since midnight, a number of minutes since the beginning of that hour, and a number of seconds since the beginning of that minute.
Accordingly, UTC can bend the rules by saying, for example, that just this once the second 23:59:60 exists before midnight. It refers to a different second from 00:00:00; only when converting into POSIX does that become ambiguous.
So UTC and TAI agree on the number of seconds since the epoch, it's just UTC doesn't encode that number in the current time. Going the other way, TAI doesn't encode the current solar time. You need a lookup table either way.
This part seems a little muddy. UTC isn't a number of seconds since an epoch, it's a number of hours since midnight, a number of minutes since the beginning of that hour, and a number of seconds since the beginning of that minute.
Accordingly, UTC can bend the rules by saying, for example, that just this once the second 23:59:60 exists before midnight. It refers to a different second from 00:00:00; only when converting into POSIX does that become ambiguous.
So UTC and TAI agree on the number of seconds since the epoch, it's just UTC doesn't encode that number in the current time. Going the other way, TAI doesn't encode the current solar time. You need a lookup table either way.