Three factors suggest President Trump has chosen well in selecting Robert O'Brien to replace John Bolton as national security adviser — with one caveat.

On the positive side, as shown by Trump's warm announcement of his selection on Twitter, O'Brien retains Trump's trust. This is the most crucial ingredient to working effectively with Trump. Ivanka Trump, Secretary of State Mike Pompeo, and CIA Director Gina Haspel have mastered this trust-effect calculation. They are able to give Trump honest assessments, even when those assessments conflict with Trump's impulses. But they are able to do so because they don't undercut the president in public or private and because they know when to shut up.

Second, O'Brien is a civilian with a strong background in foreign policy. As the president's special envoy for hostage affairs, O'Brien has 16 months' experience managing high-level and shadowy negotiations. While the media is obsessing over O'Brien's role in securing rapper A$AP Rocky's release from a Swedish prison earlier this year, it is likely O'Brien's close engagement with North Korea and Iran that attracted Trump most to him. There's a stark contrast here between O'Brien's deal-with-difficult-nations mentality and John Bolton's deep skepticism at Trump's outside-the-box negotiating style.

O'Brien also recognizes the importance of American leadership matched to effective alliances. His 2016 book, While America Slept, speaks to these themes. That's a good thing. While Trump is absolutely right to push NATO allies hard on their failure to even approach defense expenditures close to U.S. spending as a percentage of GDP, we need allies to deal with major international challenges, especially China.

Yet O'Brien does have one scratch against his name: his increasing enjoyment of the limelight. I'm reliably informed that O'Brien sometimes strayed out of the hostage negotiating area and made ill-advised remarks on some sensitive issues. While O'Brien's focus is now necessarily much broader, he'll quickly find himself out of favor if he says things that undercut Trump's stated position or policy priorities. This, admittedly, is a difficult balancing act with a president as prone to opinion changes as Trump, but it is a necessity.

All in all, however, O'Brien is a good choice for national security adviser.