junior snapshot create
junior snapshot create prepares the sandbox runtime dependencies before the app handles work. The scaffolded pnpm build script runs it on every deploy, so you do not run it by hand. It needs Vercel credentials, so run it directly only from a linked project after vercel env pull.
Run it from a project that already has @sentry/junior installed:
pnpm exec junior snapshot createThe command takes no extra arguments.
What it does
Section titled “What it does”Before resolving the snapshot, the CLI inspects the loaded plugins and summarizes the snapshot inputs:
- Plugin names
- Runtime system dependencies
- Runtime npm dependencies
- Runtime postinstall commands
It then resolves the sandbox snapshot profile, reuses a cached snapshot when possible, or rebuilds the snapshot when the profile changed.
Example output
Section titled “Example output”Typical logs look like this:
Loaded plugins (2): agent-browser, notionSandbox snapshot inputs: plugins=1 system_dependencies=1 npm_dependencies=1 postinstall_commands=1Snapshot plugins (1): agent-browserSystem dependencies (1): gtk3NPM dependencies (1): agent-browser@latestRuntime postinstall (1): agent-browser installResolving sandbox snapshot profile...Building sandbox snapshot...Sandbox snapshot create complete: runtime=node24 resolve_outcome=rebuilt cache_hit=false dependency_count=2 profile_hash=abc snapshot_id=snap_123 rebuild_reason=cache_missThe profile always includes Junior’s core sandbox tools, so every build resolves a snapshot. The scaffolded build script runs it:
{ "scripts": { "build": "junior snapshot create && nitro build" }}To build without warmup, such as in CI without Vercel credentials, set
JUNIOR_SKIP_SNAPSHOT=1. The scaffolded CI workflow does this. Sandboxes then
build their dependencies on first use.
Failure behavior
Section titled “Failure behavior”If snapshot resolution fails, the CLI exits non-zero and prints the underlying error:
junior command failed: OIDC missingTreat that as a real deploy blocker. The usual checks are the build environment, REDIS_URL, and any platform auth required for snapshot creation.
Verification
Section titled “Verification”In the Vercel build log:
- Confirm the final snapshot line includes
Sandbox snapshot create complete. - Verify the reported dependency counts match the plugins you enabled.
Next step
Section titled “Next step”Run junior check when you change plugin.yaml or SKILL.md, then deploy with Deploy to Vercel.