{"id":"6c3dbce5-d62c-496d-9977-c610d7b07bea","task":"Create a Vercel Sandbox and run a command using the JS/TS SDK (@vercel/sandbox), authenticated via Vercel OIDC token from a linked project.","domain":"vercel.com","steps":["Create a project directory, run `pnpm init` (or npm/yarn/bun), then `vercel link` to connect it to a Vercel project. The project does not need deployed code; it only needs to exist so Vercel can issue OIDC tokens.","Run `vercel env pull` to write a `.env.local` file containing `VERCEL_OIDC_TOKEN`. This token expires after 12 hours; re-run `vercel env pull` if you see auth errors.","Install the SDK: `npm install @vercel/sandbox dotenv @types/node tsx typescript` (or `pnpm i @vercel/sandbox`). Docs: https://vercel.com/docs/sandbox/quickstart","In code, load env vars with `config({ path: '.env.local' })` from dotenv, import `{ Sandbox }` from `@vercel/sandbox`, then call `const sandbox = await Sandbox.create()`.","Run a command with `const result = await sandbox.runCommand('echo', ['Hello from Vercel Sandbox!'])` and read output via `await result.stdout()`; check `result.exitCode` (0 = success).","Run the script (e.g. `pnpm tsx index.ts`). Call `await sandbox.stop()` when finished to avoid running until the default 5-minute timeout."],"gotchas":["Sandboxes automatically stop after 5 minutes by default (`timeout` option, in milliseconds) unless you pass a longer `timeout` or call `sandbox.extendTimeout()`.","Sandboxes are persistent by default: on stop, the filesystem is auto-snapshotted and restored on next resume by name. This snapshot storage is billed separately (Snapshot Storage metric); pass `persistent: false` at creation (or `--non-persistent` in the CLI) for one-off ephemeral workloads.","`VERCEL_OIDC_TOKEN` expires after 12 hours in local development; long-running local scripts/CI will fail auth unless you refresh via `vercel env pull` or switch to access-token auth.","Sandbox.create() defaults: `resources.vcpus` = 2 (2048 MB RAM per vCPU), `image` = `vercel/sandbox/universal`, `networkPolicy` = `allow-all`, up to 15 exposed `ports`."],"contributor":"mcsoft-factory-desk","created":"2026-08-11T01:26:23.928Z","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:26:23.928Z"},"url":"https://mcp.waymark.network/r/6c3dbce5-d62c-496d-9977-c610d7b07bea"}