Next week the EU withdrawal bill finally emerges from the House of Lords. The bill is now a very different piece of legislation to the one launched in the Commons by David Davis last September. It was significantly amended in the Commons just before Christmas. Now the Lords have fundamentally transformed it. MPs must therefore decide what to do with the many changes that the Lords have made. It will be the most important few months of parliamentary activity in a generation, perhaps more.

It was not always clear, when the withdrawal bill was launched, that such a great moment of decision would ever be reached. If the government and Labour leadership had had their way, the soft Brexit opportunities that now face MPs this summer would probably not have existed at all, or in very constrained ways. Both parties had their own reasons for wanting the bill to go through. But a combination of doggedness, craftiness and, above all, the size of the opposition in both houses to a hard Brexit has changed the political agenda through a series of hugely important amendments, often opposed by both the government and the Labour leadership.

This week there have been some particularly striking government defeats in the Lords. The first, moved by the bishop of Leeds, would keep the UK as a participant in EU agencies such as Europol. The second, moved by the Duke of Wellington no less, removes the government’s preferred Brexit date – 29 March 2019 – from the bill, giving elbow room for a possible agreement to pause or extend the article 50 withdrawal process.

The most wide-ranging, however, was the amendment tabled by Labour’s Lord Alli to keep the UK in the European Economic Area, which was passed on Tuesday by a majority of 29, against the advice of both major parties. This would put Britain in a relationship with the EU that is comparable to that of Norway. Norway has twice voted not to join the EU, but it remains in the European single market through the EEA. Now Britain’s MPs will have to vote again, not just on the EEA, but on almost all the pivotal issues that would make the difference between a hard Brexit and a soft one.

When the bill went through the Commons last autumn, relatively few of these issues raised large tussles. The one big defeat for Theresa May in the Commons was Dominic Grieve’s amendment that, in effect, requires parliament to vote to approve the final withdrawal agreement with the EU, on which work still continues. This remains a crunch issue, but it is now joined by the 13 or so Lords amendments on a wide range of other issues. These include continued membership of the customs union in some form, the adoption of the EU charter of fundamental rights into domestic UK law, and Chris Patten’s amendment ensuring that the UK and Ireland must agree any new Irish border rules before they come into force.

‘Every disloyal provocation by Boris Johnson – such as the foreign secretary’s ‘crazy’ jibe – acts as a recruiting sergeant for the soft Brexiters.’ Photograph: HO/AFP/Getty Images

For parliament these are all very big questions, on which there could be Commons majorities if MPs were not forced to follow party lines. Coalitions similar to the one that passed the Grieve amendment could be assembled again. Don’t forget, also, that the withdrawal bill is not the only Brexit-related legislation currently under consideration in parliament (the trade bill is particularly significant). And there is the hugely significant possibility that any new bill on the withdrawal terms could be defeated or amended (including by a demand for a fresh referendum).

May’s Brexit strategy is to hold the Tory party together by withdrawing entirely from the EU, while making serious practical compromises to maintain as “frictionless” a relationship as possible with the EU, its institutions, agencies and member states – Ireland above all. Government defeats on crucial questions such as the single market, the customs union or the Irish border would overturn the entire strategy. Yet this is becoming more likely now. May’s strategy worked for her first months as prime minister. But the “lost election” of 2017 and the fundamental differences among Conservative MPs and ministers over Brexit issues that cannot be permanently postponed mean its lifetime is now almost spent. Labour’s caution on Brexit shows little sign of changing, but there are enormous temptations for Jeremy Corbyn to overcome his anti-EU instincts in order to humiliate the government on at least some of the Lords amendments.

This explains why, even as she runs out of road on Brexit, May still acts as if she is hoping that something unexpected will turn up. There is now talk at Westminster of the Brexit bill votes being delayed to the autumn, partly to avoid embarrassing Commons defeats affecting the June EU summit at which the future relationship will be discussed – and partly because Conservative rebels on both sides of the argument might be more disciplined if the talks appear to be nearing a successful conclusion.

It is hard to imagine that the Tory party’s Commons discipline is about to collapse on every single issue that the Lords have put on the table. Nevertheless, the Tory soft Brexiters seem a bit bolder now. That is partly because their numbers are gently creeping up – and also because, in the end, these moderate Tories feel they have to fight harder now if they are to prevent their party collapsing even further to the Ukip right.

That is why every disloyal provocation by Boris Johnson or other ministers – such as the foreign secretary’s “crazy” jibe this week – acts as a recruiting sergeant for the soft Brexiters. The coming weeks and months may be their moment. A hung parliament gives them the means. The slide to the right gives them the motive. And now the Lords have given them their opportunity. It will be a hot political summer.

• Martin Kettle is a Guardian columnist