Cloud environment "Environment variables" aren't available to the Setup script
Resolved 💬 1 comment Opened May 29, 2026 by warting Closed May 29, 2026
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:
- Environment variables panel → add
FOO=bar→ Save. - Setup script:
``bash``
#!/bin/bash
echo "FOO=[$FOO]"
- 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):
- Inject panel env vars into the setup script (like GitHub Actions / Codespaces do); or
- If intentional, warn in the dialog and document the supported way to pass a setup-time secret (e.g.
CLAUDE_ENV_FILE).
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗