Yep. built my own code mode sandbox.
→ A JS interpreter, not a container or VM
→ 0.4 ms coldstart, 1 dependency, ~3k lines
→ The only way out is a tool call
→ Timeout, tool-call cap and 256 MB memory limit on by default
→ Benchmarked vs OpenCode's VM, node:vm & plain V8
🧵