Going all the way back, agency opens with same old mistakes - therein lies the pattern (6)
I believe the answer is:
mosaic
'the pattern' is the definition.
(mosaic is a kind of pattern)
'going all the way back agency' is the wordplay.
'going all' becomes 'mo' (I can't justify this - if you can you should give a lot more credence to this answer).
'the way' becomes 's' (Compass direction - South).
'back' is a reversal indicator.
'agency' becomes 'cia' (CIA is an example).
'cia' back-to-front is 'aic'.
'mo'+'s'+'aic'='MOSAIC'
'opens with same old mistakes therein lies' is the link.
I am not very happy about this link. Some or all of it may be part of another bit of the clue.
Can you help me to learn more?
(Other definitions for mosaic that I've seen before include "Small pieces fitted together" , "Like the Commandments" , "Pattern of fragments" , "Relating to Moses" , "Picture made up of small pieces of coloured glass or stones" .)