The State Department official in charge of countering terrorism said yesterday that the Reagan administration seeks "a clearer political consensus in favor of preempting terrorist attacks or hitting back in certain circumstances should we be unable to prevent them."

Ambassador Robert Oakley, director of the office of counterterrorism and emergency planning, added in testimony before the Senate Appropriations subcommittee on foreign operations that the administration also is intensifying its efforts to locate terrorists and anticipate their actions.

Sen. Arlen Specter (R-Pa.) recommended that the administration consider imposing sanctions against trade with countries that support international terrorism, citing Libya as an example. Oakley replied that sanctions have only a limited effect because other nations "move in to fill the gap."

In a related development, the Defense and State departments refused to comment on a story in yesterday's Washington Post reporting that the United States had undertaken detailed preparations to launch an anti-terrorist retaliatory bombing strike in Lebanon from the aircraft carrier USS Eisenhower before Thanksgiving.

Pentagon spokesman Michael I. Burch said the Eisenhower spent Thanksgiving in Athens but would not comment on alerts earlier in the month. The Post reported that the Eisenhower was ordered to hold her position in the Mediterranean "shortly before Thanksgiving" so she could retaliate for suspected terrorists' attacks. Burch took issue with the word "shortly." The peak of the Eisenhower's preparations were early November, according to military officials, but alerts continued after that time.