Skip to content

Runtimes

Glue picks where to run commands at startup. Tools (bash, read_file, write_file, edit_file, list_directory, grep) and background jobs all route through the chosen runtime, so the agent's prompt is identical regardless of where work actually happens.

For the capability matrix and full background, see Runtimes →.

Available runtimes

RuntimeStatusUse when
hostshippingDefault. Fast feedback, direct access to your tools.
dockershippingUntrusted code, dependency installs, generated scripts.
daytonashippingGeneral-purpose cloud sandbox (REST API; US + EU).
spritesshippingPersistent Fly.io sandbox; resumes by name; auto-sleeps when idle.
modalshippingModal sandbox tied to a Modal App; runaway-billing cap built in.

Selecting a runtime

In precedence order:

  1. GLUE_RUNTIME=daytona (env var)
  2. runtime: daytona in ~/.glue/config.yaml
  3. Legacy fallback — docker.enabled: true selects Docker; otherwise host.

Per-runtime options live in matching top-level YAML sections (daytona:, sprites:, modal:, docker:). Each adapter also reads its own env vars (e.g. DAYTONA_API_KEY, MODAL_APP) — see the config reference for the full table.

Per-runtime guides

Bootstrap (cloud runtimes)

Cloud runtimes stage your working tree at /workspace via one of three strategies. WorkspaceBootstrap picks one per session:

StrategyUsed whenWhat it captures
resume/workspace/.git already exists in the sandbox (Sprites persistent sandbox)Whatever the previous session left there
bundleHost has git AND bundle fits the runtime's upload capUncommitted edits, unpushed commits, untracked files, repos with no remote — everything visible to git add -A on the host
clone-from-remoteBundle path unavailable (no host git, or bundle too large)Whatever's reachable on origin at host HEAD SHA

Per-runtime upload caps for the bundle path:

RuntimeCapUpload mechanism
Daytona200 MBMultipart HTTP upload
Modal30 MBbase64-in-JSON to Python sidecar
Sprites3 MBbase64-over-shell exec

Run glue doctor to verify host git is available — without it, every cloud session is forced through clone-from-remote, which requires a reachable origin and sandbox-accessible auth.

End-of-session diff-out

When a cloud session ends, glue runs git format-patch + git diff from inside the sandbox and saves the result to ~/.glue/sessions/<id>/runtime.mbox with a runtime.mbox.meta.json sidecar. Apply with:

sh
glue session apply <session-id>

See Session Patches for the full flow including conflict handling, the size cap, and the DiffUnavailable warnings.

How it's wired

  • RuntimeFactory.create(...) returns a RuntimeSession (executor + workspace + sandbox metadata).
  • Cloud adapters register at startup via register{Daytona,Sprites,Modal}Runtime() in cli/bin/glue.dart.
  • File tools and ShellJobManager route through the session's Workspace and CommandExecutor — there are no dart:io paths in the tool layer.

For implementation details, see packages/glue_strategies/lib/src/runtime/runtime_factory.dart and the per-adapter register*Runtime() helpers in packages/glue_runtimes/.

Released under the MIT License.