Skip to content

Durable per-scope sandbox with an execute tool #576

Description

@iret77

Origin

Competitive analysis of yc-software/qm (2026-08-01). This is omadia's biggest functional gap versus qm.

Concept

qm gives every scope (person, channel, team) a durable sandbox — "its own computer" where installed tools stay installed. The agent's tool surface includes execute, which runs commands inside that sandbox. Key design points worth copying rather than reinventing:

  • A narrow Sandbox interface (provision/run/read/write/list/teardown) with optional capabilities discovered via type guards (process sessions, backup, blob staging), and an AgentComputerProfile declaring persistence/egress/process capabilities
  • Three interchangeable backends behind it: Fly.io Sprites, AWS Firecracker microVMs, plain local Docker
  • Read-only layers (org files, skills) are materialized by content-hash fingerprint, only re-synced on change
  • A per-scope routing table allows two backends live at once, enabling migration; capabilitiesLostMovingTo() computes what a move would break before it happens
  • Egress from the sandbox goes through a CONNECT proxy whose per-sandbox capability JWT carries the egress policy itself as a claim; the authorizer re-resolves DNS and re-checks IPs (DNS-rebinding aware)

Why adopt

omadia currently has no code-execution environment for agents at all — native tools are a closed set, and ctx.scratch is a plugin temp dir. A durable per-scope sandbox unlocks the entire "agent does real work" category (repos, data wrangling, file production) and is the substrate several other qm concepts (skills materialization, resident logins) build on. Architectural decision — worth settling early.

Reference (qm source)

  • src/sandbox/sandbox.ts, sprites-sandbox.ts, aws-sandbox.ts, local-sandbox.ts, ro-layers.ts, sandbox-routing.ts, sandbox-migrate.ts
  • src/egress-authz-main.ts (standalone egress authorizer), src/auth/capability-token.ts
  • src/tools/primitives.ts (execute/read/write in the core-owned tool surface)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfrom-qmConcept inspired by yc-software/qm (YC competitive analysis)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions