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
Fresh self-hosted Roomote v1.2.3 deployment cannot complete first-run setup with the documented ChatGPT subscription flow.
Environment
Roomote release: v1.2.3
Deployment: self-hosted Docker Compose
Host: Debian 13 x86_64
Public URL: custom HTTPS domain behind an existing reverse proxy
Inference choice: ChatGPT subscription
Steps to reproduce
Start a fresh self-hosted deployment.
Open the generated /setup URL.
Create the first administrator with email and password.
Connect/select ChatGPT subscription.
Sign in and continue setup.
Expected behavior
Setup should produce a working conversational setup session and allow the first-run cards to continue.
Actual behavior
The application repeatedly redirects to the deterministic first-admin setup session. The setup conversation never produces a response and remains stuck retrying.
The failure occurs before a model request is sent. The containers remain healthy, but setup never progresses. Re-authenticating with the email/password account returns to the same setup session. The setup page's sign-up form also reports that the account already exists when trying to start over.
Additional observation
The UI exposes ChatGPT subscription as requiring no API key, but the self-hosted runtime internally initializes an OpenCode-based adapter. It is unclear whether the ChatGPT OAuth credential is expired/unusable, whether the adapter is missing required configuration, or whether v1.2.3 has a self-hosted regression. Please document the supported reconnect/recovery path and prevent an incomplete setup session from trapping the user in a retry loop.
No credentials, tokens, or private keys are included here.
I've analyzed this issue and here's my proposed implementation plan:
The setup path currently treats a persisted ChatGPT OAuth connection as sufficient in saveSetupNewModelConfigCommand, while API-key and endpoint providers are validated through the restricted OpenCode runtime before setup advances. That allows the deterministic setup session to be created even when the ChatGPT credential or local OpenCode bootstrap cannot actually start a model request. Because getOrCreateSetupSessionCommand intentionally reuses setup:first-admin:<user>, signing in again returns to the same failed session rather than recovering it.
Update apps/web/src/trpc/commands/setup-new/index.ts and the existing provider-validation path so ChatGPT subscription setup validates the selected openai/... model through the same control-plane OpenCode configuration used by the conversational setup session before persisting the provider as ready. Keep OAuth material server-side via packages/db/src/lib/chatgpt-subscription.ts and model-runtime-config.ts; distinguish expired/rejected authorization from a local OpenCode bootstrap failure.
Refine pre-generation failure handling in packages/cloud-agents/src/server/non-task-provider-usage.ts and fast-agent/fast-agent-service.ts. Preserve modelRequestCount=0, but record the failing setup boundary (runtime config/auth resolution, server lease/readiness, session creation, event subscription, or prompt dispatch), classify credential failures as non-retryable, and stop automatically retrying configuration errors that cannot recover without operator action.
Add a recoverable first-run state instead of trapping the admin in the deterministic session. In apps/web/src/app/(onboarding)/setup/SetupSignedInFlow.tsx, the authenticated setup guards, and apps/web/src/trpc/commands/setup/setup-session.ts, preserve the existing setup session and progress but route terminal inference/auth failures back to the inference-provider step with an actionable reconnect/retry message. After successful revalidation, resume the same session rather than creating a duplicate or requiring account recreation.
Add regression coverage for fresh self-hosted setup, expired/rejected ChatGPT OAuth, OpenCode setup failure before the first model request, bounded retry behavior, provider revalidation, and deterministic session resumption. The main coverage belongs in setup-new command tests, SetupSignedInFlow/authenticated redirect tests, packages/db/src/lib/chatgpt-subscription.test.ts, model-runtime-config.test.ts, and the existing non-task inference and fast-agent diagnostics tests.
Update apps/docs/providers/inference/chatgpt.mdx, apps/docs/use-chatgpt-subscription.mdx, and apps/docs/self-hosting.mdx with the supported first-run recovery path, how to reconnect an expired subscription, and how operators can distinguish provider authorization failures from a local OpenCode startup/configuration failure without exposing credentials.
This approach prevents setup from being marked inference-ready until the exact runtime path is usable, converts unrecoverable retry loops into an operator action, and retains the idempotent setup session so recovery does not lose progress.
Please tag @roomote if you'd like me to implement this, or reply with feedback on the plan.
Activity
roomote-community commentedon Sep 4, 2026
I've analyzed this issue and here's my proposed implementation plan:
The setup path currently treats a persisted ChatGPT OAuth connection as sufficient in
saveSetupNewModelConfigCommand, while API-key and endpoint providers are validated through the restricted OpenCode runtime before setup advances. That allows the deterministic setup session to be created even when the ChatGPT credential or local OpenCode bootstrap cannot actually start a model request. BecausegetOrCreateSetupSessionCommandintentionally reusessetup:first-admin:<user>, signing in again returns to the same failed session rather than recovering it.apps/web/src/trpc/commands/setup-new/index.tsand the existing provider-validation path so ChatGPT subscription setup validates the selectedopenai/...model through the same control-plane OpenCode configuration used by the conversational setup session before persisting the provider as ready. Keep OAuth material server-side viapackages/db/src/lib/chatgpt-subscription.tsandmodel-runtime-config.ts; distinguish expired/rejected authorization from a local OpenCode bootstrap failure.packages/cloud-agents/src/server/non-task-provider-usage.tsandfast-agent/fast-agent-service.ts. PreservemodelRequestCount=0, but record the failing setup boundary (runtime config/auth resolution, server lease/readiness, session creation, event subscription, or prompt dispatch), classify credential failures as non-retryable, and stop automatically retrying configuration errors that cannot recover without operator action.apps/web/src/app/(onboarding)/setup/SetupSignedInFlow.tsx, the authenticated setup guards, andapps/web/src/trpc/commands/setup/setup-session.ts, preserve the existing setup session and progress but route terminal inference/auth failures back to the inference-provider step with an actionable reconnect/retry message. After successful revalidation, resume the same session rather than creating a duplicate or requiring account recreation.setup-newcommand tests,SetupSignedInFlow/authenticated redirect tests,packages/db/src/lib/chatgpt-subscription.test.ts,model-runtime-config.test.ts, and the existing non-task inference and fast-agent diagnostics tests.apps/docs/providers/inference/chatgpt.mdx,apps/docs/use-chatgpt-subscription.mdx, andapps/docs/self-hosting.mdxwith the supported first-run recovery path, how to reconnect an expired subscription, and how operators can distinguish provider authorization failures from a local OpenCode startup/configuration failure without exposing credentials.This approach prevents setup from being marked inference-ready until the exact runtime path is usable, converts unrecoverable retry loops into an operator action, and retains the idempotent setup session so recovery does not lose progress.
Please tag @roomote if you'd like me to implement this, or reply with feedback on the plan.
mrubens commentedon Sep 4, 2026
Thanks @avinashkanaujiya we will take a look!