Even more than his four-volume Bush at War series, Bob Woodward’s Obama’s Wars, out this week, has so much inside detail, so many accounts of behind-closed-doors conversations (laced with quotation marks, as if they were verbatim), that one sometimes wonders if Woodward wired a source before he went into a Cabinet Room meeting and retrieved the tape afterward.

But this time out, beneath the usual he-said-then-he-said (then-he-said), lurks a saga of tragedy: about the snares and illusions of the war in Afghanistan, the corruption of war generally, and the jangle of motives—the convergence and clash of bureaucratic interest, personal ambition, and earnest strategic analysis—that led Barack Obama to escalate an armed struggle that he didn’t begin and that he knew was fraught with great risk all along.

Woodward is no Shakespeare. This tragic sense wafts up through the dense Beltway-bound thicket in only a handful of passages; but they’re enough to imbue the book with a deep, uncharacteristic sadness.

And yet near the end, though much too subtly, Woodward points toward a possible way out of the quagmire—and, though he doesn’t say so explicitly, it’s a path we seem to be pursuing. So maybe, Woodward hints, though fleetingly, a full-bore tragedy might be avoided.

The book begins with President-elect Obama receiving his first really serious intelligence briefing, in which he learns that the Predator drones—those unmanned aerial vehicles with the remote-controlled cameras and smart bombs that have been bumping off terrorist leaders in Afghanistan and Pakistan—work as well as they do only because of super-secret CIA paramilitary teams on the ground; the teams recruit locals, who tell them where the bad guys are and thus where to send the drones. The drones by themselves are no cheap way out. War, as always, is unavoidably hell.

Then comes the monthslong internecine debate, through most of 2009, over how to fight the war: How many troops, where, what they should be doing, for how long, and to what end. We’ve read much of this before (some of it in Woodward’s own reporting for the Washington Post), but a few things stand out: the continued lack of clarity, all the way till the end, over just what U.S. interests are in this war; the uncertainty, even after Obama’s decision, over whether even the best-run U.S.-led campaign would affect the ultimate outcome; and, amid this debate, the Pentagon’s persistent efforts to box Obama in to the one option that the senior military leaders wanted to pursue.

At the beginning, all the major players agree that one goal should be to “defeat” the Taliban. Gen. Stanley McChrystal, then the U.S. commander in Afghanistan, says he needs at least 40,000 more troops to do that. After a few meetings, everyone realizes this goal is impossible, so they change it to “degrade” the Taliban so that at some point the Afghan security forces can take the lead in handling the threat.

Secretary of State Hillary Clinton asks McChrystal if he could get by with fewer than 40,000 extra troops, given this less demanding mission. McChrystal replies, “No.” Gen. James Jones, Obama’s national security adviser (and one of Woodward’s hero-sources), complains afterward that Obama could decide to protect just two Quonset huts in Afghanistan, and the brass would still ask for 40,000 more troops.

This rings true. A former senior Pentagon official told me in the 1970s that James Schlesinger, then Richard Nixon’s secretary of defense, asked the chief of naval operations to prepare a study of how many aircraft carriers the Navy would need if the president decided the United States should no longer defend the Indian Ocean. At the time, the Navy had 13 aircraft carriers, two of which patrolled the Indian Ocean. After a few weeks, the top admiral gave Schlesinger the study. Its conclusion: The Navy would still need 13 carriers.

In Woodward’s account, even after Obama decided to send 30,000 more troops, the Pentagon kept coming back with plans involving 40,000. Even after he decided not to pursue an all-out counterinsurgency campaign, the Pentagon kept coming back with plans involving just that.

Obama also kept asking his generals for more options to consider. They were playing the old trick of giving the president three pseudo-options—two that were clearly unacceptable (in this case, 80,000 more troops for full counterinsurgency and 10,000 troops just to train Afghan soldiers) and the one in the middle that they wanted (40,000 more troops). They never gave him another option. When Gen. James “Hoss” Cartwright, the vice chairman of the Joint Chiefs of Staff, drew up a compromise plan involving 20,000 troops (believing the president had a right to see a wide span of options, even if the military didn’t agree with them), Mullen forbade him from taking it outside the Pentagon. Obama never saw it.

In the end, Woodward reveals, Obama devised his own alternative strategy and personally wrote out its terms in a six-page, single-spaced memo that he made his top civilian and military advisers read and sign on to. (Woodward reprints the memo in the back of the book.)

This, by the way, is why Obama needed to hold those 10 national-security meetings before making his final decision on an Afghan war strategy. He wasn’t “dithering,” as Dick Cheney and other Republicans complained. Each meeting raised new questions, and the top military officers were sent back to answer them. This strategic review, Woodward writes, marked “one of the rare examples in recent American history where a president had fully understood the contours of a national-security decision.”

There are two implications here. First, presidents need to be smart; they have to ask lots of questions; they can’t just let the officers roll them, like George W. Bush did. But second, because Obama fully grasped the underlying issues of the decisions on Afghanistan, this really is “Obama’s war.”

The tragedy is that, for all the intelligent thinking and meticulous strategizing, the war may well be unwinnable, by any definition of that term, for reasons beyond Obama’s—or Petraeus’ or Mullen’s or any American’s—control.

Throughout the book, Woodward’s favored figures—Gen. Jones, Derek Harvey (a dedicated Defense Intelligence Agency officer stationed in Afghanistan), and especially Lt. Gen. Douglas Lute (Bush’s “war czar” who was kept on by Obama for his continuity and intelligence)—keep warning those around them that the war looks futile.

There are two elements to the U.S. strategy: fighting the Taliban and providing protection to the Afghan people, on behalf of—and in order to build political support for—the Afghan government. However, these prescient characters keep warning that as long as Pakistan provides safe haven to the Taliban insurgents in the mountains along the country’s border, there is no way to defeat, or seriously degrade, the Taliban. And as long as Afghan President Hamid Karzai’s government is grossly corrupt and distrusted by his own people, there’s no way to build support for him, either.

In this sense, the internal struggle over whether to go with a counterterrorist strategy or a population-centric counterinsurgency strategy is beside the point. The conditions for success aren’t present for either.

Throughout the story, Obama seems to realize this, but he’s also convinced that the stakes are too high to warrant pulling out. If the Taliban take over large chunks of Afghanistan, al-Qaida could return. Or, if that doesn’t happen, an unstable Afghanistan would likely destabilize Pakistan, which, given its toxic combination of radical jihadists and a nuclear arsenal, could endanger the region or the world.

At the same time, Obama knows, from his first intelligence briefing and several to follow, that the cheap option—relying on a handful of commandos and airstrikes fired by unmanned drones—won’t work; you need troops on the ground to build confidence among the people, who will then provide intelligence on where the drones should go.

So he’s stuck. There’s also a hidden trap in a key passage of his six-page memo on the new strategy: “This approach is not fully resourced counterinsurgency or nation-building, but a narrower approach tied more tightly to the core goal of disrupting, dismantling and eventually defeating al Qaeda and preventing al Qaeda’s return to safe haven in Afghanistan or Pakistan.”

The trap is that, to the thinking of the counterinsurgency advocates—Petraeus, Mullen, and Defense Secretary Robert Gates—this “narrower” goal can be accomplished only by a certain amount of nation-building. Woodward notes that while the White House politicos saw the strategic review as a case of Obama asserting civilian authority, the military brass came away pleased that they got pretty much everything they wanted.

Still, the quandary remains, and certainly Petraeus and Gates see it: how to accomplish the mission with a border so porous and an Afghan president so illegitimate in the eyes of his own people.

Here’s where Woodward, wittingly or not, sets down a potential solution. He describes a meeting in early May 2010, where the anti-escalation group in the White House—Lt. Gen. Lute, deputy national security adviser Thomas Donilon, Ambassador Karl Eikenberry, and Vice President Joe Biden—are discussing some new intelligence suggesting that many Taliban leaders were feeling the pressures of an eight-year war, tiring of their exile in the “safe havens” across the border, where they live under the thumb of their sponsors in Pakistan’s intelligence service.

The counterinsurgency advocates saw the way out as “clear, hold, build and transfer”—clear the insurgents from a town or province, hold it so that the government can bring in essential services and thus build loyalty among the people, then transfer security to the Afghan army and police. “Maybe there was an end run,” Woodward writes, summarizing the Biden-Lute group’s thinking, “getting some Taliban to reconcile, to break with al Qaeda and provide a bridge back into Afghanistan.”

Though Woodward doesn’t say so, this “end run” has always been a part of Petraeus’ plan, and Obama’s too. Both have said many times that the war will end with a settlement, not a victory or surrender, though Petraeus in particular has stressed that the Taliban aren’t likely to make a deal as long as they think they’re winning, so we have to rack up some tactical or political victories first—which leads back to the enduring quandary: How does that happen? How do we get out of there?

Just this week, Petraeus told reporters that very high-level Taliban leaders have been reaching out to Karzai for reconciliation. What brought this on? Is this real? Or is it exaggerated by wishful thinking, brought on by a desire to quell growing doubts about this war, doubts that will be heightened, no doubt, by this book’s publication?

At one point in the book, Lute tells Obama that, given all the unlikely preconditions for success, the strategy he’s about to choose isn’t so much a “calculated risk” as a “gamble.” A gamble may be all that Obama and his team—and, by implication, the rest of us—have. Sometimes gambles pay off, sometimes not. Stay tuned for Obama’s Wars, Volume 2.

Become a fan of Slate on Facebook. Follow Slate and the Slate Foreign Desk on Twitter.