cloud-sandbox

Diagnose and work around tooling, network, and environment constraints in Claude Code cloud sandbox sessions.

518|49|Updated Apr 7, 2021
One-click install
npx skills add https://github.com/dxos/dxos --skill cloud-sandbox
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloud-sandbox
Source: https://github.com/dxos/dxos/tree/main/.agents/skills/cloud-sandbox
Command: npx skills add https://github.com/dxos/dxos --skill cloud-sandbox

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Claude Code cloud sandbox is an ephemeral Linux container that differs from the local environment assumed by AGENTS.md and CLAUDE.md: plugins are not installed, moon and gh may be missing, GitHub's API is unreachable from the shell, and all HTTPS traffic must pass through a local proxy. This Skill provides the detection checks, workarounds, and fallback procedures needed to keep building, testing, and committing in that environment.

Core Features & Use Cases

  • Environment Detection: Identify the sandbox via CLAUDE_CODE_REMOTE and CCR_* variables, and determine whether the setup script ran by checking for proto, moon, and node_modules.
  • Tooling Workarounds: Bootstrap plugins with .claude/scripts/bootstrap-plugins.sh, fall back to pnpm dlx oxfmt when the formatter is missing, and typecheck against sources with a throwaway tsconfig when moon's WASM toolchains fail to load.
  • Network and Browser Configuration: Route Chromium and Playwright through the local proxy with --ssl-version-max=tls1.2, and read GitHub run status through mcp__github__* tools instead of the blocked REST API.
  • Use Case: A remote session's e2e tests fail with ERR_CONNECTION_RESET and pnpm exec moon dies with a registry load error. Use this Skill to confirm the sandbox, apply the Chromium proxy flags, and validate changes with a source-level tsc check instead of the full build.

Quick Start

Ask the agent to check whether this session is running in the Claude Code cloud sandbox and configure the environment so builds and tests can run.

Frequently Asked Questions about cloud-sandbox

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect a Claude Code cloud sandbox session?

Check for the CLAUDE_CODE_REMOTE environment variable, along with CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPE and the CCR_* variable family such as CCR_AGENT_PROXY_ENABLED. Any of these indicates the session runs in the ephemeral cloud container rather than a local environment.

Why does moon fail with plugin::loader::registry::load_failure?

Moon loads its javascript and bun toolchains as WASM plugins from ghcr, whose blob host the sandbox egress gateway blocks with a 403. When this happens every moon run command fails, so fall back to typechecking sources directly with a throwaway tsconfig using the source export condition.

How do I run Playwright or Chromium behind the sandbox proxy?

Chromium ignores HTTPS_PROXY, so pass --proxy-server with the proxy address, --proxy-bypass-list for localhost, and --ssl-version-max=tls1.2 because the egress proxy resets TLS 1.3 handshakes. Use the pre-installed browser at /opt/pw-browsers/chromium and never run playwright install for it.

Why is the GitHub API unreachable from the sandbox shell?

The sandbox blocks direct access to api.github.com, returning 'GitHub access is not enabled for this session' even with a token. Read workflow run status through the mcp__github__* tools instead, which route through the server side.

What happens to uncommitted work when the sandbox container ends?

The container is ephemeral and reclaimed after inactivity or session end, so anything not committed and pushed is lost. Push early rather than at the end of a long task, and verify the checkout is not stale with git merge-base before committing.

Why are plugin skills like /dxos:project missing in remote sessions?

A fresh container starts with an empty installed_plugins.json, and enabledPlugins in settings.json only declares plugins without fetching them. Run bash .claude/scripts/bootstrap-plugins.sh to register the marketplace locally and install, then start a fresh session to see the plugin.