[TASK] Refactor Sandbox class to extract message handling from PassthroughAPI