Claude Code for Web: setup-script field DX makes setup failures very hard to debug

Resolved 💬 2 comments Opened May 25, 2026 by counterposition Closed May 28, 2026

Context: Getting a uv-based Python repo's setup script working in a Claude Code for Web cloud environment took ~8 new-session iterations. Most of the round-trips were caused by undocumented execution-context behavior of the setup-script field, not the script itself. Filing as field feedback — each item below is individually minor but they compounded badly.

Issues

  1. The setup-script field runs under set -e, with no indication. A command sequence that works fine interactively aborts in the field because a non-zero status mid-pipeline kills everything (e.g. a while read loop returns 1 at EOF inside var=$(...), which trips errexit).
  1. No output is shown when the field fails early / under errexit. The result was literally:

``
Setup script failed with exit code 1.
``
with no "Script output" section at all — zero diagnostic signal. This was by far the biggest time-sink. (Normal command failures do show output; the silent errexit case is the trap.) Please always surface captured stdout/stderr, even on early exit.

  1. The execution context is surprising and undocumented. The field runs with CWD=/home/user, $HOME=/root, and the repo cloned at /home/user/<repo> — three different locations. As a result, both bash scripts/setup.sh (relative to CWD) and bash ~/<repo>/scripts/setup.sh (HOME-anchored) fail with No such file or directory. Please run the setup field from the repo root, or document the layout.
  1. There is no documented env var pointing at the checkout. I ended up auto-discovering the repo by scanning env for a value whose directory contained the script. A documented $REPO_DIR / $WORKSPACE-style variable would make setup scripts trivial.
  1. Egress blocks astral.sh (HTTP 403) while allowing github.com, objects.githubusercontent.com, pypi.org, and files.pythonhosted.org. The official uv installer (https://astral.sh/uv/<ver>/install.sh) fails; pulling the uv binary from GitHub Releases works. The allowlist is undocumented and the inconsistency is surprising — please document the exact allowlist (or allow astral.sh).
  1. Every iteration requires a brand-new session with a full cold setup (re-download Python + ~240 packages, re-clone git deps). An in-place re-run / faster debug loop for the setup script would help a lot.

Net

Individually small, but together these turned "point the environment at a working setup script" into a multi-hour, ~8-session loop — mostly spent guessing at undocumented context because failures produced no output. Fixing #2 (always show output) and #3/#4 (normalize/document the context + expose a repo-path var) would remove most of the pain.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗