WASHINGTON — Over the past four months, American intelligence agencies and aides to President Obama assembled a menu of options to respond to Russia’s hacking during the election, ranging from the obvious — exposing President Vladimir V. Putin’s financial ties to oligarchs — to the innovative, including manipulating the computer code that Russia uses in designing its cyberweapons.

But while Mr. Obama vowed on Friday to “send a clear message to Russia” as both a punishment and a deterrent, some of the options were rejected as ineffective, others as too risky. If the choices had been better, one of the aides involved in the debate noted recently, the president would have acted by now.

In his last weeks in office, that Situation Room debate has confronted a naturally cautious president with a complex calculus that President-elect Donald J. Trump will soon inherit: how to use the world’s most powerful cyberarsenal at a moment when the United States, as the election showed, remains highly vulnerable.

“Is there something we can do to them, that they would see, they would realize 98 percent that we did it, but that wouldn’t be so obvious that they would then have to respond for their own honor?” David H. Petraeus, the former director of the Central Intelligence Agency under Mr. Obama, asked on Friday, at a conference here sponsored by Harvard’s Belfer Center for Science and International Affairs. “The question is how subtle do you want it, how damaging do you want it, how do you try to end it here rather than just ratchet it up?”