Cloudflare's Sandbox guide includes CodeAgent: a Think subclass exposing run_command and reusing its attached container across calls. The snippet sets a ten-minute inactivity timeout. Repository Git access and snapshot restoration need additional setup.