Parliamentary ping-pong
Parliamentary ping-pong is a phrase used to describe a phenomenon in the Parliament of the United Kingdom, in which a bill appears to rapidly bounce back and forth between the two chambers like a ping-pong ball bounces between the players in a game of table tennis. Procedure 

The British parliament is bicameral, consisting of the House of Commons and the House of Lords. Before a Bill can receive the Royal Assent and become law, it must be passed in its final form by both the Commons and the Lords without changes. After a Bill has been passed by one House, it is sent to the other House, which can either reject it, pass it with changes, or pass it unchanged. If the Bill is passed with changes, it is returned to the House in which it originated, which considers each new change and can decide:

to agree with some or all of the other House's amendments. to agree with some or all of the other House's amendments as long as it’s changed in a certain way (amendments to the other House's amendments). to agree with some or all of the other House's amendments as long as some other changes to the bill are made ("consequential amendments"). to disagree with some or all of the other House's amendments, but suggest an alternative ("amendments in lieu"). to disagree with the other House's amendments. The Bill is then sent once again to the House where the Bill did not originate, which can decide:
to insist on amendments which have been disagreed to. not to insist on amendments which have been disagreed to
not to insist on the amendments which have been disagreed to, but propose amendments in lieu. to agree with amendments to the amendments, consequential amendments, or amendments in lieu have been proposed. to disagree with amendments to amendments, consequential amendments, or amendments in lieu which have been proposed. The Bill is then sent back to the House in which it originated, which can decide whether or not to insist in its opposition to amendments which have been insisted upon by the other House, and/or to propose new amendments to amendments, consequential amendments and amendments in lieu. If one House insists on its amendments, and the other House insists on its opposition thereto (a "double insistence"), the Bill is deemed as having been rejected. However, if each House continues to propose new amendments to amendments, consequential amendments and amendments in lieu, the process repeats, so the Bill bounces back and forth between the two chambers like a ping-pong ball, until one side backs down or a compromise is found. The debates in each House are usually scheduled weeks or months apart. However, in certain circumstances when there is time pressure. Usually the time limit is imposed by the end of the Parliamentary session when all parliamentary business, including incomplete Bills, is ended and must start again from scratch in the next session. This usually occurs at the State Opening of Parliament in November; parliament can continue working on the previous year's business up to the night before. Another instance is the wash-up period of a few days between the calling of a general election and the ensuing dissolution of parliament. More rarely, the time limit may be imposed by outside events, such as an impending deadline from a court order, judicial review, or events in foreign affairs. Example 

An extreme example of parliamentary ping-pong involved the Prevention of Terrorism Bill 2005. Over the course of 30 hours on 10–11 March 2005, the bill was considered five times by the Lords and four times by the Commons. The need for legislation, and associated time pressure, arose from the court case A v Secretary of State for the Home Department. Ten individuals suspected of terrorism had been detained indefinitely under Part IV of the Anti-terrorism, Crime and Security Act 2001. Nine of them appealed against their imprisonment; in December 2004 the Law Lords (then the court of last resort in the UK) granted the appeal, on the grounds that Part IV was incompatible with the Human Rights Act 1998. The suspects were not freed immediately, as existing powers allowed terrorism suspects to be detained up to 90 days without charge. The judgment effectively set a deadline of 14 March 2005 for Parliament to pass alternative legislation which could be applied to the suspects without violating their human rights. In response to the judgment, the government proposed to create control orders, which could be applied to the suspects. The bill necessary to introduce these powers was tabled in the House of Commons on 22 February 2005. The bill passed in the Commons, then the Lords amended it to include a sunset clause, which the Commons did not agree with. As Parliament would not be sitting over the weekend of 12–13 March, the legislation had to be completed by the end of Friday 11 March. With the deadline approaching, the bill began to ping-pong between the two Houses. The timetable was: 
10 March 2005
 House of Lords — 11:31am to 3:00pm
 House of Commons — 6:00pm to 7:37pm
 House of Lords — 10:15pm to 11:26pm
11 March 2005
 House of Commons — 1:20am to 2:39am
 House of Lords — 5:00am to 5:56am
 House of Commons — 8:00am to 9:13am
 House of Lords — 11:40am to 1:11pm
 House of Commons — 3:30pm to 4:00pm
 House of Lords — 6:30pm to 7:00pm
A compromise was eventually agreed, involving annual reviews of the law rather than a full sunset clause. Both Houses then passed the bill, which received royal assent at 7:20pm on 11 March 2005. Other recent examples 
 Trade Act 2021
 European Union (Withdrawal) Act 2018
 Alternative Vote debate in February 2011
 ID Cards debate in March 2006
 House of Commons and House of Lords transcripts for 10 March 2005. Education Bill in July 2002

See also
Trilogue - European Union
United States congressional conference committee

References

Parliament of the United Kingdom