The 2011 Christmas party at the Department for Education had a Strictly Come Dancing theme, with civil servants and guests twirling around the lower-ground-floor canteen, transformed for the evening into a ballroom. Michael Gove, the Secretary of State, sat in judgement. He got a laugh by comparing one ramshackle performance to coalition government. "It sometimes looked as if they were pulling in different directions, there were a few wobbly bits on show, but they somehow stayed together all the way through."

The metaphor is apt for a governing partnership marked by choreographed rows and reconciliations, like the pouts and clinches of an amateur tango. The Conservatives lead; the Liberal Democrats follow. When the couple first took to the floor it seemed unlikely they would get to the end of the routine without collapsing in a heap.

The most serious stumble so far came at the end of 2011 with David Cameron's decision to wield a veto over plans for a new European Union treaty. That was a hard stomp on Nick Clegg's delicate Europhile toes. The Lib Dem leader briefly left the floor. He refused to join the Prime Minister in parliament to present a statement on the early-December European summit, prompting rumours that the relationship was in crisis.

Still the dance goes on, albeit with a little less intimacy. "If anyone needed a reminder that Cameron is a brutal, ruthless, tribal politician, that was it," says a member of Clegg's inner circle. But the main lesson that the Lib Dems have taken from the veto episode is that if coalition can survive an EU row, it can survive anything. The outbreak of unilateral Brussels-bashing by the Tories has been taken as a licence for the junior coalition partner to be noisier about its own distinctive views. Within days of his no-show in parliament, Clegg attacked the cherished right-wing Tory ambition of supporting marriage through the tax system, deriding it as naive nostalgia for the 1950s.

The Lib Dems are reviving their enthusiasm for House of Lords reform. A campaign is planned for early in the new year to associate the Deputy Prime Minister with drives for increased social mobility and "fairer distribution of wealth", the implication being that Conservatives stand for established hierarchies and entrenched inequality.

Dress rehearsal

The Tory leadership is relaxed about these improvised policy solos, knowing that the Lib Dems always come back to Cameron's ballroom hold. Clegg is locked in by appalling personal and party poll ratings and will not bring down the government to fight a suicide election. Some Tory backbenchers are less patient. They note the opinion-poll lead that followed their leader's flirtation with anti-EU populism and conclude that voters are receptive to the kind of carnivorous Toryism that Cameron's "modernisation" of the party in opposition was meant to bury. That would make alliance with the Lib Dems an evil that is no longer necessary. Yet there is no appetite in Downing Street for an early election. A by-election on 15 December in the west London seat of Feltham and Heston showed no "veto effect" for the Conservatives among the kind of suburban voters that must be won over if Cameron wants to break free from coalition. Labour held the seat with an increased majority.

The prevailing trend in opinion polls still points to a hung parliament and Cameron, given the choice, will not ask the country for a majority until he is sure of getting one. A senior civil servant neatly summarises the PM's calculations: "In the end, he knows that the safest way to stay in power is not to have an election."

Labour is in no hurry to test public opinion, either. The Feltham by-election result was a relief but hardly a tonic. The mood among opposition MPs hovers between frustration and despair. The economy is stagnant, unemployment is rising, living standards are falling and the government's plans are a palimpsest of rewritten targets and faulty forecasts. Yet Ed Miliband still fails to land blows on the Prime Minister or persuade voters that he would do the job better. The Labour leader's defence is that the defeat of 2010 is still too recent, making it unreasonable to expect a sudden renaissance. The plan so far has been to describe what is wrong with British capitalism (it is unfair) and then assemble an alternative vision (a work in progress), ready for the moment when the voters are ready to listen.

The shadow cabinet is growing ever more nervous about this softly-softly strategy. The Tories' mini-surge over Europe confirmed that the lead Labour had in the polls for most of 2011 was soft. Increasingly, comparisons are being drawn with the party's fate under Neil Kinnock, who had much higher poll ratings than Margaret Thatcher and John Major but saw the advantage melt away on polling day in 1992. "We certainly aren't in any kind of shape to fight an election," one shadow minister says.

For the time being, however, there is no prospect of a challenge to Miliband's leadership. The scars of Kinnock's failure run deep but the wounds of civil war between Tony Blair and Gordon Brown are more recent. After the trauma of that great feud, public loyalty to the leader is deemed the ultimate virtue. Unity in the hope that Miliband's way will work trumps suspicion that it has already failed.

In private, even Miliband's closest allies concede that there is a problem, but they insist his analysis of the country's predicament is the right one and will prevail as memories fade of last government's failures and the current one gets more of the blame for the parlous state of the economy. "We have credibility issues, but they are emotional, not rational," says a Labour strategist. The assessment remains that the leader has time on his side.

Miliband's team is nonetheless braced for turbulence around the time of London's mayoral election early next May. With Boris Johnson, the Conservative incumbent, enjoying a lead among supporters of all parties, the Labour leadership has all but written off Ken Livingstone, the party's own candidate. Friends of the Labour leader are already rehearsing excuses, presenting the contest as a grudge match between two independent characters that has little to do with party politics. But if Johnson does win (and it is hard to find anyone in Westminster who thinks he will lose), the Tories will celebrate the result as proof that Labour, under Miliband, has no electoral momentum.

Labour's hope is that failure to win the mayoralty will be offset by gains in elections for the London Assembly and councils held on the same day. Those ballots also promise yet more pain for the Lib Dems. After a massacre in the local elections in May 2011, Clegg spent a grim night on the phone commiserating with dejected ex-councillors. He was heartened then by the resilience that his party showed, understanding the sacrifices being made for the sake of coalition. That stoicism is unlikely to be sustained through another savage cull.

The only leader entering the new year enjoying the goodwill of his party is Cameron, who, in the words of a senior government adviser, "feels his sails filled with the wind of public opinion". Unfortunately for the Prime Minister, his 2012 diary is punctuated with more EU summits; one is scheduled imminently for 30 January. There, he will be expected to meet the heightened expectations of backbenchers baying for Brussels blood. One defining feature of Tory Euroscepticism is the capacity to gobble up concessions and come back for more. Another is a willingness to feel betrayed by leaders who make compromises in Europe.

Let's face the music

What looked at first sight like a domestic triumph for Cameron is also an expression of weakness. His MPs do not give him their affection freely. He must buy it with policies and tactical gestures. Those bribes then provoke the Lib Dems into making rival demands. That doesn't leave much that can be easily identified as an authentic Cameroon project.

Downing Street has been celebrating the Brussels veto as a pivotal moment. The decision is said to have imprinted an image of the Prime Minister as a strong leader in the minds of voters who were previously unsure what he stood for. He should worry that the canvas was so blank. There is no long-term electoral advantage in being defined by an unplanned lurch into hardline Euroscepticism.

The Prime Minister's main strength remains the relative weakness of his rivals. The Lib Dem and Labour leaders are both committed to strategies that don't seem to be working and protected by their parties' fear that changing course would just make things worse. For as long as that is the case, Cameron will continue to lead the dance. Clegg will continue to follow, sometimes reluctantly, sometimes with gusto, while Miliband the wallflower will continue to watch uncomfortably from the edge of the ballroom, tapping his foot out of time.