Fifty clicks of a keyboard and the pirouette of a mouse. Two minutes of a file clerk’s day. That’s possibly all it would have taken to save the lives of 26 Americans, slain in their pews, by a wife-beating child abuser who should never have had a gun.

The graphic horror of American gun deaths is too often intensified by the bureaucratic indifference that does so little to thwart the carnage.

Devin Patrick Kelley, the man who brought so much bloodshed to Sutherland Springs, Tex., the morning of Nov. 5, had hurt a child before. In 2012, he was convicted in a military court-martial of assaulting his wife and cracking his infant stepson’s skull.

That conviction should have barred Mr. Kelley under federal law from purchasing firearms, but the Air Force failed to report it to the National Instant Criminal Background Check System, often known by its acronym, NICS, the screening tool for gun purchases in the United States.

People convicted of felonies or domestic violence misdemeanors forfeit their right to bear arms in the United States. There are similar prohibitions for people with diagnoses of mental illness and known drug or alcohol abuse. In theory, state and federal agencies plus hospitals are supposed to report all such information to the F.B.I. Licensed gun sellers are required to contact an F.B.I. office in West Virginia, by telephone or electronically, before ringing up a gun sale to ensure the buyer isn’t listed as banned.

But NICS is only as good as the data that’s put into it. A decade ago, a mentally ill man named Seung-Hui Cho went on a killing spree on the campus of Virginia Tech, murdering 32 people and injuring 17 others. In the aftermath, Congress passed a bill to strengthen NICS with more criminal records and mental health information. While there is still room for improvement, Department of Justice data suggests the number of federal and state records entered into NICS has increased significantly since the law was signed in January 2008.

Now, a group of senators, led by John Cornyn, a Republican from Texas and one of the strongest gun rights advocates in Congress, has put forward a similar measure that would improve the reporting of domestic violence convictions. Mr. Cornyn’s measure would impose a financial penalty by barring bonuses for the heads of federal agencies that fail to report the convictions. It would also reward states that improve reporting, and would provide more federal funding toward those efforts.

In the weeks since the Sutherland Springs murders, it’s become apparent that the Pentagon’s failure in the Kelley case was one of many; time and again, it has failed to forward criminal incident data to the F.B.I., which maintains the three databases that NICS pulls from. An Air Force review conducted last month determined that the military had failed to report several dozen serious crimes to the bureau’s databases and that it was in the process of fixing the problem. Outside the Pentagon, a report in 2013 by a public interest group, the National Consortium for Justice Information and Statistics, found millions of records missing — of criminal convictions, prior mental illness and other red flags — that are supposed to keep guns out of potentially dangerous hands.

The new bill, called the Fix NICS Act, is the rare piece of bipartisan gun legislation that has no meaningful opposition. Across the aisle from Mr. Cornyn, the lead co-sponsor is Chris Murphy of Connecticut, with three other senior Democrats backing it, too. The National Rifle Association has also applauded the measure.

Attorney General Jeff Sessions has weighed in, announcing on Nov. 22 a full evaluation of the NICS process. Suggesting that any error that leads to tragedy is one too many, he said the NICS database “is critical for us to be able to keep guns out of the hands of those that are prohibited from owning them.”

The Justice Department’s review will focus on military reporting, as well as the “format, structure and wording” of NICS forms and other potential obstacles to compliance. A bigger question that it might want to consider is whether NICS reporting should be more standardized. Right now, every state submits what it wants, with no true national protocols. Even the definition of “domestic violence” varies from state to state.

Congress should do its job and hold a vote by the end of the year on the Fix NICS Act — unencumbered by cynical amendments meant to delay or even torpedo it, thus risking many more lives. The House made this harder this month by tying its version of this bill to partisan legislation that would allow national concealed-carry reciprocity.

For its part, the Pentagon should look to itself and punish those responsible for the Kelley failure. Falling asleep on guard duty and shirking administrative due diligence can be equally deadly.

This editorial was originally published Nov. 29. It has since been updated.