The EU will start strategising for the post-Brexit trade negotiations with the UK at a December leaders’ summit following Boris Johnson’s formal agreement to an extension to 31 January 2020.

There is renewed confidence in Brussels that the UK is moving towards a general election and resolution of the first Brexit phase.

Johnson’s attempt to secure both a short period for pushing the withdrawal agreement bill through the Commons as well as a post-Brexit general election on 12 December was defeated on Monday evening.

But there are signs that there may still be a majority for a pre-Brexit general election after the government indicated it would table a bill allowing that to happen.

The Labour leader, Jeremy Corbyn, gave his most positive comments yet about a December poll in his statement to the Commons following the vote on Monday evening. “We agree that an early election is necessary,” he said.

The French government is leading the way in insisting that in December the EU’s 27 members should sit down in the cold light of day to hold discussions on strategy for the future negotiations over the relationship with the UK.

An Élysée palace official said: “It’s healthy to sit down and lay out our ideas for future negotiations, to stop reacting in the heat of the moment to this or that Brexit event.”

Earlier on Monday, the EU agreed to a Brexit extension to 31 January 2020, with the option for the UK to leave earlier if a deal is ratified, clearing the way for opposition parties to back a general election.

After a 30-minute meeting of European ambassadors, Donald Tusk, the president of the European council, said the EU27 had agreed to the request made by the British prime minister just over a week ago.

Johnson, who said he would rather die in a ditch than delay Brexit, was under an obligation to agree to the terms, breaking his pledge to leave on 31 October, “no ifs, no buts … do or die”.

He later sent a letter insisting that the delay was “unwanted” but confirmed “the UK’s formal agreement to this extension”.

He added he hoped the EU would insist that this would be the last extension but no such pledge was made by any heads of member states or heads of the bloc’s institutions.

Sources in Brussels said they would not make any commitments that could be a “hostage to fortune”.

Guy Verhofstadt, the European parliament’s Brexit coordinator, tweeted: “Relieved that finally no one died in a ditch. Whether the UK’s democratic choice is revoke or an orderly withdraw, confirmed or not in a second referendum, the uncertainty of Brexit has gone on for far too long. This extra time must deliver a way forward.”

Under the terms of the extension, the UK has three months more of EU membership but it can leave on the first day of any of those months if the withdrawal agreement is ratified in both Westminster and the European parliament in the meantime.

The EU has insisted it will not renegotiate the withdrawal agreement again. The UK also has “an obligation” to nominate a candidate to join the European commission. The prime minister has previously said he will not put forward a nominee.

By agreeing the extension through a written procedure, to be completed by Wednesday at the latest, EU leaders will avoid convening for a summit in Brussels.

The Guardian view on general election calls: stay and finish the Brexit job | Editorial Read more

“Tusk will launch the written procedure among EU27 with a deadline of 24 hours,” an EU source said.

Emmanuel Macron’s office said France had worked all weekend to insist on very clear conditions written “in black and white” to allow the UK’s Brexit extension.

An Élysée official said: “All weekend, France took the initiative with Germany, Ireland, Donald Tusk’s team and a few other countries, to fix the terms of the extension very precisely: that the withdrawal agreement isn’t renegotiable, that the UK would follow a code of conduct and allow the EU’s 27 members to meet to discuss other issues for their future [such as the budget], and that the UK must legally appoint a commissioner if the European commission sits before the UK leaves.”

The Élysée said France’s long-held preference for a much shorter extension had focussed minds, applied pressure and allowed those clear conditions to be put in place.

After Macron was styled by some media as seeking to put a spanner in the works of a longer extension, the Élysée official said this had never been France’s line. “A veto or extension is not our approach. We always build a collective solution in the end ... The most important issue is the unity of the EU’s 27 members. We wanted to preserve that unity without creating a crisis over Brexit. Because the worst outcome would be for Brexit — a British political crisis — to be imported to the EU and spread a form of poison and division that we don’t want.”

Q&A What does the 'Benn act' say? Show Hide The EU Withdrawal (No 2) Act, often referred to as the Benn act, is a law that was passed by MPs in an attempt to prevent Boris Johnson's government leaving the EU without a deal. It specifies that by 19 October the government must have either secured a deal that parliament has approved, or secured explicit approval from parliament to leave without a deal. If neither of those conditions are met – and if Johnson cannot get his deal passed on 'super Saturday' – it requires the prime minister to write to the EU to ask for a further Brexit extension. The form of the letter that the prime minister must send is set out in full in the act. The act says the extension should last until 31 January 2020, or longer if the EU suggests. Here is the full text of the European Union (Withdrawal) (No 2) Act 2019 Martin Belam

The source added that France’s main concern was to stay out of British internal politics and to ensure that a Brexit extension was justified. “Some said we were playing Boris Johnson’s game, or the British opposition’s game. We have never tried to take any part in Britain’s internal game.”

The official said Macron had no interest in imposing a General de Gaulle or Napoleon-inspired “splendid isolation” within the EU.

During the ambassadors’ meeting, France’s representative complained that the three-month extension would lift the pressure on MPs to ratify the revised withdrawal agreement, but reluctantly gave his support, EU sources said.