For the past 25 months, Congress has been considering the role that biotechnology plays in agriculture and society and whether foods with genetically engineered ingredients should carry a mandatory special label.

I’ve never supported the idea of requiring labels on food with GMO ingredients. This is a safe and proven technology, as we’ve known for years and as the National Academy of Sciences affirmed in a comprehensive report in May. What’s more, anti-technology groups have plotted to use labels as a tool for raising unfounded alarms in consumers and ultimately drive their use out of practice.

So, I’ve always thought GMO labels should be voluntary rather than mandatory.

Yet many Americans have said they want labeling. Lawmakers in my home state of Vermont responded by passing a set of onerous rules that will accomplish little beyond driving up prices and stigmatizing safe food. Other states have considered their own versions. No doubt state-by-state labeling will create a nightmare for interstate commerce.

The time has come for a compromise and to move forward from the issue.

Last week, Sen. Pat Roberts, the Kansas Republican who chairs the Senate’s agriculture committee did just that. He reached an intelligent compromise on GMO labeling with Sen. Debbie Stabenow, the Michigan Democrat who is the committee’s ranking member.

Their agreement establishes national standards for labeling food with genetically modified ingredients and also eliminates state regulations that have threatened to create a patchwork of confusing and expensive rules for food packaging.

The senators deserve kudos for their work. At a time when many people accuse Congress of gridlock, they’ve come up with a bipartisan answer to a thorny problem. Each side gives a little and gets a little—and in the end, we’ll all gain a workable system that keeps food affordable and protects innovation.

The senators came up with a creative solution. Their bill requires products to disclose GMO ingredients, either with on-package labels, toll-free phone numbers, a website, or—and here’s the smart part—digital codes. It means that in the future, shoppers would be able to use their mobile phones to directly access additional data about what they’re buying, right from the aisles of grocery stores. And by the way, these digital codes – quick response or QR codes- are not new. They’ve been around since the 1990’s, gaining in popularity in the mid to late 2000’s.

This flexible rule demands disclosure but also gives food companies the opportunity to provide more information than what they can cram onto the side of a package. Imagine websites that explain not only that products contain GMOs, but also why farmers choose to use them and how they’re safe.

In return, states would lose the authority to enact GMO labeling regulations that differ from these federal standards. It means that Vermont’s law, which formally goes into effect on July 1, would be voided.

Those are the major pieces of the compromise, but the bill also features sensible details. It includes a prudent definition of “genetic engineering,” limiting its application to today’s popular recombinant DNA methods and in no way restricting the emerging techniques of gene editing and RNA interference. It also proposes that food certified as organic now could be labeled as non-GMO, which is something that the organic-food industry has sought.

What’s more, dairy and meat products won’t be considered GMO just because animals have eaten GMO feed. In addition, restaurants and small food makers receive reasonable exemptions.

“Compromise is the best and cheapest lawyer,” the author Robert Louis Stevenson supposedly once said. The quip is most likely made-up—Stevenson probably never uttered it—but the line neatly sums up the advantages of this agreement.

The Roberts-Stabenow deal promises to end a political controversy that has accomplished little beyond confusing ordinary people about what’s in their food. It also wipes out the need for costly ballot initiatives and litigation.

Much remains to be done. The full Senate still has to approve the agreement, which means getting 60 votes from both Republicans and Democrats. The House addressed labeling with its own bipartisan bill last year, but its approach stalled in the Senate and now it will want to take up this one separately. Finally, President Obama will have to sign the final product—something that he appears likely to do, given the Department of Agriculture’s favorable statement last week about the Roberts-Stabenow compromise.

None of this is guaranteed. And we’ll all want to take a close look at the actual language of the legislation, as it winds its way through Washington.

What we have here, however, is an actual compromise—and one that ought to satisfy everyone who supports safe and affordable food.

Joanna Lidback and her husband operate the Farm at Wheeler Mountain, a diversified dairy farm in Vermont.  Joanna volunteers as a board member for the Global Farmer Network where this column first appears.