No, it’s simply not a defense. Sandboxes are to contain the blast, not prevent it. Anything that the agent can do inside the sandbox is at risk, including reaching out to any APIs it can reach using keys it has. Plus, agents are very clever at escaping.