Skip to content

Cloud environment "Environment variables" aren't available to the Setup script #63541

Description

@warting

Summary: In Claude Code on the web, variables set in a cloud environment's Environment variables panel are empty inside the Setup script — they're only injected once the session is running. Both fields sit in the same "Update cloud environment" dialog with no hint they run in different contexts, and it fails silently (empty value, no error).

Repro:

  1. Environment variables panel → add FOO=bar → Save.
  2. Setup script:
    #!/bin/bash
    echo "FOO=[$FOO]"
  3. Start a session.

Expected FOO=[bar]; actual FOO=[].

Impact: The standard "install a CLI, then authenticate with a key from an env var" pattern breaks silently:

curl -fsSL https://example.com/install.sh | sh
mytool init "$MYTOOL_API_KEY"   # empty here → confusing downstream auth error

The downstream tool fails with an auth error that gives no hint the real cause is a missing variable.

Asks (any one):

  1. Inject panel env vars into the setup script (like GitHub Actions / Codespaces do); or
  2. If intentional, warn in the dialog and document the supported way to pass a setup-time secret (e.g. CLAUDE_ENV_FILE).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:claude-code-webClaude Code on the web. claude.com/codebugSomething isn't workingplatform:webIssue specifically occurs on the web

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions