A last-minute push to limit new cryptocurrency tax-reporting requirements in the $1 trillion infrastructure package failed Monday despite a bipartisan agreement and a frenzied lobbying push.

The Biden administration and Sen. Rob Portman (R-Ohio) agreed in late July to increase tax-reporting requirements for cryptocurrency brokers — exchanges where investors can buy and sell cryptocurrencies, such as bitcoin — as a way to pay for the infrastructure deal.

The effort faced blowback in recent days from cryptocurrency investors who joined Sens. Ron Wyden (D-Ore.), Patrick J. Toomey (R-Pa.) and Cynthia M. Lummis (R-Wyo.) in arguing that it could effectively cripple the burgeoning industry. Those senators agreed that crypto brokers should be required to report tax forms to the IRS but expressed concern that the legislation as written would enable federal authorities to impose those requirements on a much wider swath of cryptocurrency players, such as the “miners” responsible for validating cryptocurrency transactions.

After a weekend of frenzied negotiations, the two sides came together on a bipartisan agreement announced Monday to specifically exempt other cryptocurrency participants, including miners and software developers, from the new requirements. But the effort to incorporate those changes into the legislation fell apart, entangled in a broader Senate dispute over whether to allow amendments to the infrastructure package.

Sen. Richard C. Shelby (R-Ala.) prevented an attempt to vote on the new crypto language via “unanimous consent” — a process that requires unanimous support among senators — because he wanted a vote on his amendment to increase military funding. Sen. Bernie Sanders (I-Vt.), who opposes higher military spending, rejected the effort to vote on both Shelby’s amendment and the crypto amendment. When Sen. Ted Cruz (R-Tex.) tried to advance the crypto measure without Shelby’s amendment, Shelby objected.

“Billions of dollar of value are going to be destroyed,” Cruz fumed on the Senate floor as the efforts collapsed, arguing that Congress had just taken steps that would “obliterate” the crypto industry.

The impact of the legislation on the cryptocurrency industry remains unclear. The Biden administration has maintained from the outset of the discussions that it has never had any intent to apply the new rules to miners and developers that are unlikely to possess 1099 tax information. But they had also feared the exemptions could be exploited by other cryptocurrency actors to evade their compliance obligations.

The compromise language was reviewed by Treasury Department officials, who do not oppose the measure, according to a person familiar with the matter who spoke on the condition of anonymity to reflect a position not yet made public. Treasury Secretary Janet L. Yellen, in a statement Monday, said she was grateful to senators “for working together on this amendment to provide clarity on important provisions” related to tax evasion in the cryptocurrency market.

The negotiators’ statement could clarify Congress’s intent in passing the measure, which could affect how Treasury Department officials interpret the law when implementing the new requirements. Cryptocurrency investors and advocates were still pushing for the House to change the bill after it passes the Senate.

The group publicly backing the new agreement was conspicuously missing Wyden, who had been adamant that the original language was too broad. Wyden said on Twitter that he did not believe the new agreement was adequate “to protect privacy and security,” while acknowledging it had been improved. Critics said Wyden’s original amendment would have created a tax-reporting loophole for entities involved in “decentralized finance” — a form of trading on a network not controlled by banks or traditional finance institutions — in a way that would have allowed tax avoidance to proliferate.

“If you carve them out of tax reporting, most of the market will move there,” said Alexis Goldstein, director of financial policy at the Open Markets Institute, a think tank.