Summary
On a repository-managed Cloud Agent environment, none of our team/environment secrets reach the Build install step, so every Build fails at install. Runtime injection works fine (interactive agents on the same environment get the secrets) — the failure is isolated to the Build phase. Per the Builds docs, team/environment secrets should be available to install for private package registries.
Environment
- Name: WebApp Test
- Environment ID: 95e8736e-9a6f-11f1-ba66-0e7d0216e441
- Owning team: 17048573
- Type: repository-managed (.cursor/environment.json with a build.dockerfile)
What works (runtime)
Our interactive Cloud Agent on this environment receives the secrets at runtime:
- GITLAB_TOKEN is a live env var
- CLOUD_AGENT_ALL_SECRET_NAMES = GITLAB_REGISTRY_USER,GITLAB_TOKEN,PIP_INDEX_URL
- Confirmed functionally: at runtime we logged into the private registry, pulled private images, and installed private wheels successfully.
What fails (Build install)
Every Build prints, in the install step:
“unset” = the variable is absent, not empty.
What we tried (all fail identically at install → INSTALL_FAILED)
We set the secrets at both Team and Environment scope and cycled every Type:
- Environment Variable (Environment scope) — build bld-20260818-abd64058-ec91-4a17-b455-f6c6c02c2620
- Build Secret (Team + Environment) — build bld-20260817-fcb7567c-5cbb-4c6e-a2b3-70cbff0e44da
- Runtime Secret (Environment) — build bld-20260817-2421b45a-0a5c-43d1-a9dd-c0b263d9c945
What we ruled out
- Not misconfigured scope: the same Environment-scoped secrets are received by interactive agents at runtime.
- Not a network issue: egress is allow-all and public image pulls succeed in the same build.
- Not empty values: the report prints “unset”, not “defined but empty”.
- We know Build Secret type is documented as Dockerfile-mount-only; the concern is that Environment Variable / Runtime Secret (team/environment scope) also never reach
install.
Related but distinct
This looks related to — but different from — the runtime-injection bug fixed in July (topics 166083 and 165916). Those were about secrets missing in the running VM; runtime works for us now. Ours is specifically the Build install phase. Note the “recreate in Personal scope” workaround from those threads does not apply here, since user secrets are excluded from Builds by design (per the Builds doc).
Logs
[aisap-cloud] credential environment visible to this step:
[aisap-cloud] GITLAB_TOKEN: unset
[aisap-cloud] PIP_INDEX_URL: unset
[aisap-cloud] GITLAB_REGISTRY_USER: unset
[aisap-cloud] No GitLab credential reached this step
[INSTALL] Exit code: 1
build_logs.txt (221.1 KB)
Question
How do we make a team/environment secret available to the Build install step? If this is supposed to work per the docs, it appears to be a bug in secret injection for Builds — please investigate builds abd64058 and fcb7567c.

