House leaders were discussing the Senate’s measure, a senior Democratic aide said late Monday.

President Trump’s unpredictability on surveillance issues could also upend negotiations. The president hinted last week that he might not sign the bill because it did not rein in spying aggressively enough. But Representative Kevin McCarthy of California, the House Republican leader, later said the president assured him that he would.

The Senate’s action on Monday is an effort to put off until June the expiration of four F.B.I. powers dating to the aftermath of the Sept. 11 attacks, including one authority that most lawmakers agree should expire.

Under that authority, the National Security Agency is allowed to operate a system that could swiftly access logs of Americans’ domestic phone calls on the servers of phone companies, enabling counterterrorism analysts to scrutinize social links in search of hidden associates of terrorism suspects.

The Freedom Act system replaced a previously secret program in which the agency systematically vacuumed up logs of Americans’ phone records tracing back to the Sept. 11 attacks. It was exposed in the 2013 leaks by the former intelligence contractor Edward J. Snowden.

But the Freedom Act system proved dysfunctional, expensive and inadequate. The National Security Agency repeatedly had to purge the records it collected from the system after discovering that phone companies had sent more data than the agency had the legal authority to sift through.

The agency spent about $100 million on the system between 2015 and 2019, when it shut down the program, and obtained only two intelligence leads that the F.B.I. did not already know about, according to a recently declassified report by the Privacy and Civil Liberties Oversight Board.

The most frequently used of the three powers that the F.B.I. is keeping for now is the ability to get a FISA court order to obtain business records deemed relevant to a terrorism or espionage investigation. The other two involve special FISA wiretaps: one that lets the F.B.I. swiftly follow a suspect who changes phones to evade monitoring, and one that lets the F.B.I. target a “lone wolf” terrorism suspect who lacks ties to a foreign group like Al Qaeda.