Skip to content

Sandbox

Compare mikan's supported host, container, and image sandbox modes.

Local development

host has the least setup and does not inject vault env. It runs every office in one filesystem, so it cannot enforce a private office’s visibility and is a trusted deployment.

Mainline isolation

oci:<image> lets mikan manage lifecycle, workspace mounts, vault env, and resource limits.

ModeExecution locationVault env injectionVault keyNotes
hosthost machinenot injectedderived from the platform userLocal development only; requires a trusted read-write projection
container:<name>existing Docker containerinjectedderived from the container nameone container one vault; multiple people sharing one container also share its vault
oci:<image>OCI container managed by mikaninjectedthe office keyCurrent recommended isolation mode; 1 conversation = 1 vault = 1 container

The office key is the versioned v1-<platform>-<readable-id>-<hash> segment that also names the conversation’s directory under the workspace. See Conversation offices.

Each conversation owns one directory under the workspace root — its office — named by office key rather than by the platform’s raw conversation id. Sandbox mounts follow that directory, so inside a runtime the office is at /workspace/<office-key>.

Which parts of the workspace a runtime sees follows the office’s visibility (ADR 0008), derived from the Slack conversation type: public channels are public; private channels, DMs, group DMs, externally shared channels, and unknown kinds are private. Every office gets the same mount shape; only the read-only flags differ:

Mounted under /workspacePublic officePrivate office
<office-key>/ — the office itselfread-writeread-write
MEMORY.md, skills/ — shared knowledgeread-writeread-only
public/<office-key>/ — every public officeread-onlyread-only

Nothing mounts the workspace root. The admin portal or /pi-sandbox visibility private can narrow a public channel; nothing can widen beyond Slack. Only oci:* enforces visibility; the other modes report managedProjection: false and serve a private office with a one-time logged warning. Field semantics and the retired door-policy settings are documented in Configuration.

0.5.3 workspaces hold directories named by raw conversation id. mikan migrate moves them to the office layout, together with their vaults, settings, sessions, and events; see Upgrading from 0.5.3.

oci:<image> recommended is the primary developed and recommended sandbox mode today; the other modes are kept for local development, compatibility, or experiments, and some capabilities will not be filled in.

Capabilityhostcontainer:<name>oci:<image>
command execution✅✅✅
mikan-managed runtime lifecyclenot applicable❌✅
per-conversation container / runtime❌❌✅
per-conversation vault env❌❌✅
automatic vault file projection / bind mount❌❌✅
automatic workspace mounthostself-managed✅
enforced office visibility❌❌✅
idle auto-stop / recreatenot applicable❌✅
default CPU / memory limits❌❌✅
/pi-sandbox boost❌❌✅
agent sandbox tool sets limits❌❌✅
recommendation levellocal devlegacy / compatibilitymainline

Most ❌ rows are refusals rather than silent downgrades. The exception is office visibility: a mode that cannot enforce it logs Sandbox '<type>' cannot enforce private office visibility once per office and continues, because those modes are trusted deployments by definition. A mode that cannot mount vault files raises Sandbox type "<type>" does not support vault file mounts instead of running without the credential. On modes that cannot project files, keep vault credentials in env only.