You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`relayfile login` (with no flags — the normal browser-based path, not the broken `--no-open` path from #378) then fails when bootstrapping delegated relayfile credentials for a workspace it hasn't seen before:
```
Already logged in to https://agentrelay.com/cloud
error: bootstrap delegated relayfile credentials: mint delegated relayfile credentials: http 401 unauthorized: Unauthorized
```
Reproduction (exact steps)
`agent-relay cloud logout`
`agent-relay cloud login` — completes successfully, browser flow works, `agent-relay cloud whoami` confirms a valid session with the scopes above
`relayfile login` (targeting the hosted service, no `--server`/`--token` override) — fails with the 401 above
Reproduced twice: once against a session that had been sitting for a while, and once immediately after a completely fresh `cloud login`. Same scopes, same 401 both times — this rules out a simple stale-token explanation.
Workaround attempted, also blocked
Reusing an existing workspace that already has working delegated credentials (one that was bootstrapped previously, e.g. by another tool) avoids the mint call and works fine — `relayfile` commands against that workspace succeed. But that's not usable as a general workaround: a workspace already mirrored locally by another process cannot be mounted a second time without `--rehome`, which would break the existing mirror.
Impact
Any genuinely headless/scripted first-time `relayfile login` against the hosted service — a fresh machine, a fresh workspace, a fresh CI/agent context — cannot bootstrap delegated relayfile credentials at all. The only workaround right now is self-hosting a relayfile server, which sidesteps this cloud auth path entirely.
Where to look
`cmd/relayfile-cli/main.go` around the `login`/bootstrap-delegated-credentials flow (search `bootstrap delegated relayfile credentials`, `mint delegated relayfile credentials`) — does the delegated-mint call request/expect a scope that `agent-relay cloud login`'s default grant doesn't include?
Whether `agent-relay cloud login` needs an explicit scope request (e.g. a flag) for relayfile delegation, and if so, whether `relayfile login`'s wrapper call is passing it.
Bug
A completely fresh `agent-relay cloud login` (browser flow, real re-auth, not a stale cached session) only grants scopes:
```
Scopes: auth:workspace:follow-user, cli:auth
```
`relayfile login` (with no flags — the normal browser-based path, not the broken `--no-open` path from #378) then fails when bootstrapping delegated relayfile credentials for a workspace it hasn't seen before:
```
Already logged in to https://agentrelay.com/cloud
error: bootstrap delegated relayfile credentials: mint delegated relayfile credentials: http 401 unauthorized: Unauthorized
```
Reproduction (exact steps)
Reproduced twice: once against a session that had been sitting for a while, and once immediately after a completely fresh `cloud login`. Same scopes, same 401 both times — this rules out a simple stale-token explanation.
Workaround attempted, also blocked
Reusing an existing workspace that already has working delegated credentials (one that was bootstrapped previously, e.g. by another tool) avoids the mint call and works fine — `relayfile` commands against that workspace succeed. But that's not usable as a general workaround: a workspace already mirrored locally by another process cannot be mounted a second time without `--rehome`, which would break the existing mirror.
Impact
Any genuinely headless/scripted first-time `relayfile login` against the hosted service — a fresh machine, a fresh workspace, a fresh CI/agent context — cannot bootstrap delegated relayfile credentials at all. The only workaround right now is self-hosting a relayfile server, which sidesteps this cloud auth path entirely.
Where to look