General Sir David Richards, chief of the the defence staff, will tomorrow (18 July) hand over his baton at a ceremony on Horse Guards Parade in central London.

His successor is General Sir Nick Houghton, a clear-thinking Yorkshireman who, like Richards, is not frightened to admit that military commanders and their political masters alike have made mistakes, in particular in Iraq and Afghanistan.

Richards was commander of Nato troops in Afghanistan in 2006, the year thousands of British soldiers were deployed to Helmand in what is now recognised as an ill-thought-out, surge. British troops, were inadequately briefed, inadequately trained, and inadequately equipped, just as they were in Iraq.

Richards recognised the mistakes though he also said that Afghanistan and its people had "entered my bloodstream". He continued: "The outcome of the war in Afghanistan will have a profound effect on future conflict and geopolitics."

He was one of the first to recognise the need to talk to elements of the Taliban and that Pakistan was key to peace in Afghanistan.

He encouraged Sandhurst cadets to go and watch a series of plays on Afghanistan's history, including its past wars fighting British imperial troops, at London's Tricycle Theatre.

Richards was not afraid to confront his peers and ministers, and also to engage in debate with outsiders, including academics, and the young.

However, he had to watch his Ps and Qs especially as 10 Downing Street and successive defence secretaries, culminating in the incumbent, Philip Hammond, were determined to stifle any real debate about defence policy.

Richards first made his name in 2000 as commander of the force sent to evacuate Britons and other foreigners from the civil war in Sierra Leone. He went beyond his mandate telling the president, Ahmed Tejan Kabbah, he would stay and defeat the rebels. The British government backed him. Looking back 10 years later, Richards said: "If it had gone wrong, they'd have cut me off at the knees."

Richards was sceptical about the decision to buy two very large aircraft carriers for the navy and Conservative plans - delayed until after the next election – to replace Trident with a like-for-like nuclear missile system.

"We cannot go back to operating as we might have done even 10 years ago when it was still tanks, fast jets, and fleet escorts that dominated the doctrine of our three services," Richards said in the run-up to the 2010 defence and security review.

"Defence should respond to the new strategic, indeed economic, environment by ensuring much more ruthlessly that our armed forces are appropriate and relevant to the context in which they will operate … many defence establishments have not yet fully adapted to the security realities of… [a] dangerous new century", he once said pointedly.

In a public lecture in 2012, Richards said that ministers had cut the armed forces' numbers and resources without reducing their demands for operations.

"We have a whole load of tasks expected of us. Our political masters are quite happy to reduce the size of the armed forces, but their appetite to exercise influence on the world stage is, quite understandably, the same as it has always been.

"Often politicians say to me, 'Can you go and do this?' I say to them, 'With what?' "

In the (much-needed) recent shake-up in the Ministry of Defence, he succeeded in restoring the influence and status of the chiefs of staff in the MoD's labyrinthine bureaucracy through a new Armed Forces Committee."

Richards used his role as member of the National Security Council set up by David Cameron, to talk turkey -as did another member of the committee, the head of MI6, Sir John Sawers. Those meetings were secret.

But it is no secret he was frustrated about the lack of a proper debate about strategy - military and diplomatic as well as political and a realistic appraisal of Britain's role in the world.

He could share his words of wisdom now with the House of Lords (a normal destination for a retired chief of defence staff) - and the rest of us.