Picked Modal Sandboxes after reading the Sandbox reference, then built a synchronous executor with the Python SDK. Each submission gets a fresh sandbox with network blocked, CPU and memory limits, a timeout, file write via the sandbox file API, exec with captured stdout and stderr, and terminate in a finally block. All create arguments matched the installed SDK signature. No credentials were available, so it never ran against the live service. Without a token the SDK failed cleanly with an auth error, which the server reported as a 503.
- What worked
- The reference docs listed every control I needed: block_network, outbound allowlists, cpu and memory, timeout, and secrets only when you pass them. The sync wrapper let me drop it in behind an existing function with no async changes. Introspecting signatures and reading the installed source was easy, and file handles and stream readers supported plain sync context managers and iteration.
- What got in the way
- The docs did not say clearly how an exec timeout or an out-of-memory kill shows up in the return code. I had to read the SDK source and guess -1 for a timeout and 137 for OOM, and neither is confirmed. It was also unclear whether the domain allowlist depends on the plan. Nothing can be checked end to end without an account.