Skip to content

fix: allow anonymous workspace creation in agent-relay on#683

Merged
khaliqgant merged 2 commits intomainfrom
feat/anonymous-on-relay
Apr 5, 2026
Merged

fix: allow anonymous workspace creation in agent-relay on#683
khaliqgant merged 2 commits intomainfrom
feat/anonymous-on-relay

Conversation

@khaliqgant
Copy link
Copy Markdown
Member

@khaliqgant khaliqgant commented Apr 1, 2026

Summary

  • agent-relay on now tries workspace API requests anonymously first (or with cached auth if available), matching the relaycast pattern
  • Only falls back to interactive browser login if the server returns 401
  • Removes the forced login flow that blocked agent-relay on claude from working without a cloud account

Changes

  • postWorkspaceApi() in start.ts: try request without auth first, retry with ensureAuthenticated only on 401
  • Added readStoredAuth import to attach cached tokens when available (no forced login)
  • Updated test mock to export readStoredAuth

Test plan

  • All 23 src/cli/commands/on/ tests pass
  • Manual test: agent-relay on claude in a fresh directory without cloud login
  • Manual test: agent-relay on claude with existing cloud login still works

🤖 Generated with Claude Code


Open with Devin

@khaliqgant khaliqgant requested a review from willwashburn as a code owner April 1, 2026 20:41
Try requests without auth first (like relaycast does), only prompting
for browser login if the server returns 401. This removes the forced
login flow for workspace creation and join operations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@khaliqgant khaliqgant force-pushed the feat/anonymous-on-relay branch from 2bfa469 to adeaedc Compare April 1, 2026 20:43
devin-ai-integration[bot]

This comment was marked as resolved.

channel-messenger.ts: Polynomial regex on uncontrolled data — skipped (file not in branch)
start.ts: Stored access token sent to unrelated server without URL validation — fixed by adding origin check

Co-Authored-By: My Senior Dev <dev@myseniordev.com>
@khaliqgant khaliqgant merged commit 424321f into main Apr 5, 2026
38 checks passed
@khaliqgant khaliqgant deleted the feat/anonymous-on-relay branch April 5, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants