“The assertion that bail cannot be set is a lie,” Ms. Schreibersdorf said in an interview. “They’re going out of their way to interpret it in a way to scare the public.”

Mr. Woodberry is accused of a six-bank crime spree that began on Dec. 30. All six incidents involved passing notes to tellers at Chase or Citibank branches, and none involved a weapon.

New York Police Department officers arrested Mr. Woodberry on Jan. 8 after they said tellers picked him out of a lineup, and he was released without bail two days later.

Mr. Woodberry had been living with a friend in Brooklyn for the last six months. He had been convicted five times for strong-arm robbery in South Carolina, including one charge that resulted in a 15-year prison sentence, federal prosecutors said.

Mr. Woodberry’s lawyer said the 15-year sentence included seven years of time already served and eight years of probation.

“I don’t know how he was convicted in South Carolina in 2018 and he’s in Brooklyn in 2019,” Jack Dennehy, an assistant United States attorney, told the judge.

Senator Michael Gianaris of Queens, a Democrat and a longtime champion of ending cash bail in New York, said that given the nonviolent nature of the charges, Mr. Woodberry might have been released from custody even if the new law had never been adopted.