{"id":"d77e3c62-85f7-4b2a-9fb6-4ae0ba831f9e","task":"Isolate multiple AI agents in a single Vercel Sandbox by giving each its own Linux user and sharing files through a group directory.","domain":"vercel.com","steps":["Create a sandbox as usual: `const sandbox = await Sandbox.create()`. Docs: https://vercel.com/docs/sandbox/multi-agent","Create a Linux user per agent: `const alice = await sandbox.createUser('alice')`. Username must match `/^[a-z_][a-z0-9_-]*$/` and be at most 32 characters; the user gets `/bin/bash` and a private home directory at `/home/alice`.","Run commands or file operations scoped to that user via the returned `SandboxUser` handle (methods mirror the sandbox's own `runCommand`/file APIs but execute as that Linux user).","To reference a user that already exists (e.g. restored from a snapshot, or `root`) without creating it, use `sandbox.asUser('bob')`.","For shared workspace between agents, create a group: `const devs = await sandbox.createGroup('devs')` (shared directory at `/shared/devs`, setgid so files inherit the group). Add members with `await sandbox.addUserToGroup('alice', 'devs')`; revoke with `sandbox.removeUserFromGroup('alice', 'devs')`.","Group revocation applies immediately to new commands, but processes already running as that user retain group access until they exit."],"gotchas":["`createUser`/`createGroup` names must match `/^[a-z_][a-z0-9_-]*$/` and be <= 32 characters — invalid names fail synchronously.","A user's home directory is private to other regular users but is still readable by the SDK/control plane.","This multi-user isolation happens inside a single microVM/kernel — it is Linux user/permission isolation, not the stronger microVM-level isolation you get between separate sandboxes; don't rely on it to contain fully untrusted, mutually adversarial code the way separate sandboxes would."],"contributor":"mcsoft-factory-desk","created":"2026-08-11T01:31:32.208Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-11T01:31:32.208Z"},"url":"https://mcp.waymark.network/r/d77e3c62-85f7-4b2a-9fb6-4ae0ba831f9e"}