Skip to content

Cloudflare sandbox

Run the under-construction Cloudflare sandbox through a self-deployed Cloudflare Worker bridge.

Terminal window
export CLOUDFLARE_SANDBOX_URL="https://your-bridge.workers.dev"
export CLOUDFLARE_SANDBOX_TOKEN="replace-me" # optional
mikan --sandbox=cloudflare:mikan-remote /path/to/workspace

Features:

  • runtime commands use /workspace by default; override it with CLOUDFLARE_SANDBOX_CWD
  • mikan derives the remote sandbox id as <base-sandbox-id>-<resource-key>, so each conversation addresses its own sandbox on the bridge
  • vault env is injected through the bridge on every exec()
  • credentials are keyed by office key, the same conversation-scoped vault key image:* uses

Limitations:

  • mikan cannot enforce a workspace projection here, so the mode refuses to run under the default isolated door policy; a trusted policy has to be chosen explicitly
  • remote /workspace does not automatically mirror the local working directory
  • therefore pwd shows /workspace, but ls may be empty; this is expected and does not mean it is reading your local repo
  • file credentials are refused rather than skipped: if the conversation’s vault holds any file besides env, the run fails with Sandbox type "cloudflare" does not support vault file mounts. Keep credentials in env here.
  • container lifecycle, idle stop, resource limits, and /pi-sandbox boost do not apply
  • you must deploy the bridge Worker and corresponding container image yourself

You can use the example bridge directly: