WASHINGTON—President Donald Trump deferred to his Pentagon chief’s caution and tempered his preference for a more robust attack on Syria over allegations it used deadly gas on civilians, the first hints at the direction of his revamped national-security team.

The decision late last week, detailed by people familiar with the process, marked the first substantive test of the group now that John Bolton is serving as Mr. Trump’s national security adviser.

After...