The Senate agreed yesterday to vote on approval of the main Panama Canal treaty no later than April 26, with a chance the showdown could come earlier.

After nearly a week of haggling and threats to cut the 10 day Easter recess down to along weekend, treaty supporters and opponents agreed on a formula for setting a definite date for the second vote. The first canal treaty - guaranteeing the canal's neutrality - passed last week. The second treaty provides for turning the canal over to Panama by the year 2000.

Senate Majority Leader Robert C. Byrd (D.W. Va.) and senate Minority Leader Howard H. Baker Jr. (R. Tenn) both supportors, and Sen. Jesse Helms (R.N. C.) a leading opponent, will meet April 5 to work April 26.

Byrd had repeatedly threatened to cut short the 10 days Easter recess to along weekend to win agreement for a vote.

The agreement was reached at mid afternoon after the first half of an amendment by Sen. James B. Allen (D. Ala) was rejected by a wide margin.

The first section would have guaranteed that only the United States could build a second Atlantic Pracific waterway in Panama. The second part would permit U.S. construction and operation of a canal in a third country anywhere in the Western Hemisphere.