The Mortain counterattack is the victim of two myths. The first one is that Allied fighter bombers single handedly defeated the German attack. I’ve covered this here. The other one is that the defending forces were forewarned thanks to ULTRA intelligence.For example ‘Why the Allies Won’ by Richard Overy says in page 174
‘Intelligence on the counter-attack at Mortain was plentiful on the Allied side. The time when it would be launched was revealed through Ultra decrypts. Bradley was able to place forces in strongly fortified areas in front of the German threat. A little after midnight on 7 August the Panzer forces began their attack. One division under cover of darkness and early morning mist covered 10 miles. But when the mist finally cleared at midday, the German armour was subjected to an air attack of exceptional intensity. The German forces made no progress and suffered heavy losses. On that afternoon Bradley began to counter-attack. By the end of the following day, the German Panzer divisions were back where they had started, and faced irresistible pressure on either flank.’
Although the solution of German crypto systems provided valuable intelligence to the Allies that does not mean that every operation was betrayed from this source or that Allied units were always aware of the enemy plans.
In the case of the Mortain battle it is true that the codebreakers of Bletchley Park were able to decode the German orders. However the information was sent just before the Germans attacked thus leaving no time for redeployment.The USAF history ‘D-Day 1944 Air Power over the Normandy Beaches and Beyond’ admits:
‘On the evening of the 6th, orders went out for five Panzer divisions to attack through Mortain (which had already fallen to American troops) ninety minutes later--at 18:30 hours. ULTRA did not send out this message until midnight, but the German attack had itself been delayed in the field until just after midnight. The Allied signals arrived immediately before the German attack, offering the Americans no time whatsoever to make extensive plans or redeployments for the assault.’
Similar information is available from the official history ‘British Intelligence in the Second World War’, vol3 part 2, in pages 245-6‘Another emergency signal sent out at 20:01 reported that 2nd SS Panzer was to attack Mortain and then St Hilaire. The latter would be bombarded until midnight. The decrypt of JK II's affirmative reply to 2nd SS Panzer's request for support was signalled at 21:40. At 00:11 on 7 August another emergency signal from GC and CS reported JK II's statement that Seventh Army would attack west from the Sourdeval-Mortain area in the evening of 6 August with elements of five Panzer divisions. …...’
So the failure of the German attack was not due to the fact that Allied units were expecting them. Instead it was a result of standard military factors (low combat strength due to losses, low morale, lack of supplies, efficient defense by the American units etc)Sources: ‘British Intelligence in the Second World War’, vol3 part 2, ibiblio.org, ‘The history of Hut 6’, ‘Why the Allies Won’, wikipedia