Yes
I'm not sure why there is any doubt about this:
You can make an opportunity attack when a hostile
creature that you can see moves out of your reach.
If the putative rogue has a reach of 5 feet or more, a reaction available and the target is visible then if the target leave's the rogue's reach using their own movement then they rogue can launch an Attack of Opportunity.
Yes, if the second Goblin is not within the Reach of the thing making the opportunity attack
It seems a bit weird, however the criteria for triggering an opportunity attack are:
- You are moving out of the reach of a hostile creature
- This movement is from one of your Actions, Bonus Actions, Movement or Reaction
- You have not taken the Disengage action
- You are not Teleporting
For this question we can discount Point 4, as the Goblin Boss can't teleport.
We'll also ignore Disengaging for now.
For Point 2, the movement is by the Goblin Boss' Reaction, which fulfills that criteria
For Point 1, if the swapping with the second Goblin does not cause the Goblin Boss to leave the Reach of any hostile creature, it will not trigger an Opportunity attack. In the diagrams below, the first set of movement will not trigger an opportunity attack, while the second set will.
EG -> EB
B G
EBG -> EGB
E - Enemy;
G - Goblin;
B - Goblin Boss
Note that wherever the second Goblin is moved from, it does not trigger an Opportunity attack from anything as its movement is forced by the Goblin Boss.
As for using Disengage (via Nimble Escape), it only stops OAs for the rest of your Turn, not the entire Round.
So, if someone had Readied an action to hit the Goblin Boss when the Boss did a specific thing, then the Goblin Boss did that thing on the Boss' turn, and in Reaction the Boss used Redirect Attack, that would not trigger an OA, wherever it moved, as it is still the Boss' Turn so Disengage is still in effect. But normally, Disengage would not help for this.
Best Answer
The rules unfortunately use natural language and seemingly contradict themselves. Ask the GM
Reading with natural language, the rules seem to state that both bonus actions and reactions are actions
Some rules quotes on bonus actions and reactions:
I would absolutely assume this means bonus actions and reactions are both actions. If an item has a special or additional fee, in either case I would agree it has a fee. If something is a special or additional action, I would naturally conclude it must also be an action.
Yet when something requires your action, it doesn't mean your bonus action or reaction
Countless features throughout the game use phrases such as "as an action" or "using your action" or similar and these refer to your actual, big action. Similarly there is the fighter's Action Surge:
This only lets you take an additional action and does not allow for a second bonus action (or reaction) despite bonus actions literally being called "an additional action". The SAC settles this clearly:
Nonetheless there are times the rules refer to an action and do include bonus actions
Further complicating this are One With Shadows and an SAC entry concerning it:
So here we see "take an action" include bonus actions because "a bonus action is an action". And yet, Action Surge, when letting you take "an additional action" apparently does not allow for an additional bonus action. Furthermore, why is there this rule, if bonus actions really are actions:
Perhaps the rule is just redundantly repeating information. Or perhaps it's clarifying that, unlike with Action Surge, in these specific scenarios, when something affects your action it also affects your bonus action.
Meanwhile, reactions are not meant to be considered actions
We should also note that while bonus actions are not called out explicitly in One With Shadows, reactions are. The practice of calling out reactions but not bonus actions is extremely common throughout the rules, such as in the Incapacitated condition, and this seems to indicate that reactions are not actions. According to Crawford, and the most upvoted answer to this related question this is the case:
This is despite the fact that reactions are described nearly identically to bonus actions, which somehow are actions (well... except when they aren't, like Action Surge).
Putting it all together for opportunity attacks
So what happens if you move using your bonus action? The written rules are really a lot of a mess. At times they assume bonus actions are actions (One With Shadows), at times they assume they are not ("as an action" and Action Surge), and at times they assume reactions are not actions (listing both out in various features). Meanwhile, the text that supports that bonus actions are actually actions is almost identical to the description of reactions, so why would we interpret these phrases to have completely different meanings? (This sheds more confusion on why bonus actions are actions and thus whether they are actions at all).
I don't see any real way to reconcile all of these rules in a coherent manner. Bonus actions simultaneously do and do not count as actions, and I don't see any easy way to know when each is the case. The writers unfortunately used natural language, which didn't help here, and picking through them for the RAW gets mixed results. I say, ask the GM.
At my own tables, using your bonus action to move provokes opportunity attacks, whether this is a houserule or not, I could not say.