OVER THE LAST DOZEN years it has been a mounting diplomatic imperative for the United States to update the terms on which it enjoys access for itself, and ensures access for others, through the Panama canal. The treaty that Teddy Roosevelt imposed upon a prostrate Panama in 1903, granting the United States control (not sovereignty) "in perpetuity" of a strategic strip cutting the country in half, served well for decades. But at least since the 1960s, when Panamanian nationalism belatedly began to assert itself, the treaty has been a serious embarrassment to American hemispheric diplomacy and, by its own provocative nature, the largest potential threat to continued American use of the canal. Lyndon Johnson started looking for a new treaty in 1964. Jimmy Carter's negotiators, Ellsworth Bunker and Sol Linowitz, reported agreement "in principle" this week. That is very good news.

All the details are not yet drafted, but the outlines are clear. The United States would, by stages ending in 2000, turn the canal and zone back to Panama, which would undertake to run the canal and keep passage open to all comers. After 2000, the United States could intervene to protect the canal's neutrality" against third-country threats. We find these terms fair. The risks of eventually having the canal in other hands cannot be wished away. But those risks seem substantially smaller than the risks of keeping the waterway exclusively in American hands. The key American concession (to yield control "in perpetuity") was than matched by the key Panamanian concession (to permit Washington a defense role after 2000). Indeed, Gen. Omar Torrijos, Panama's leader, will have no small problem rebutting the criticism that he gave up more than a self-respecting sovereign state should. Imagine France with a right of intervention in New Orleans.

The Senate, which must ratify a new treaty, and the House, which will vote on certain aspects of the return of property and control, now formally enter the process. Hold on. In the Congress as in the country, many people brush aside the strategic and diplomatic benefits a new treaty would bring and the losses it would preclude, and project worst-case scenarios in which the Panamanians, defying every sensible interest of their own, break the treaty and somehow close the canal and perhaps tempt renewed American intervention. Too, many people who believe, correctly, that the canal is a marvelous American achievement believe, incorrectly, that it's permanent, sovereign American territory just as the 50 states are. The going will be all uphill. But if Jimmy Carter has marched up the diplomatic hill without being prepared to fight the political battle, he's not much of a President.