MCPcopy
hub / github.com/codeaashu/claude-code / getBridgeDisabledReason

Function getBridgeDisabledReason

src/bridge/bridgeEnabled.ts:70–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68 * that re-login would fix it. See CC-1165 / gh-33105.
69 */
70export async function getBridgeDisabledReason(): Promise<string | null> {
71 if (feature('BRIDGE_MODE')) {
72 if (!isClaudeAISubscriber()) {
73 return 'Remote Control requires a claude.ai subscription. Run `claude auth login` to sign in with your claude.ai account.'
74 }
75 if (!hasProfileScope()) {
76 return 'Remote Control requires a full-scope login token. Long-lived tokens (from `claude setup-token` or CLAUDE_CODE_OAUTH_TOKEN) are limited to inference-only for security reasons. Run `claude auth login` to use Remote Control.'
77 }
78 if (!getOauthAccountInfo()?.organizationUuid) {
79 return 'Unable to determine your organization for Remote Control eligibility. Run `claude auth login` to refresh your account information.'
80 }
81 if (!(await checkGate_CACHED_OR_BLOCKING('tengu_ccr_bridge'))) {
82 return 'Remote Control is not yet enabled for your account.'
83 }
84 return null
85 }
86 return 'Remote Control is not available in this build.'
87}
88
89// try/catch: main.tsx:5698 calls isBridgeEnabled() while defining the Commander
90// program, before enableConfigs() runs. isClaudeAISubscriber() → getGlobalConfig()

Callers 3

runFunction · 0.85
checkBridgePrerequisitesFunction · 0.85
mainFunction · 0.85

Calls 5

featureFunction · 0.85
isClaudeAISubscriberFunction · 0.70
hasProfileScopeFunction · 0.70
getOauthAccountInfoFunction · 0.70

Tested by

no test coverage detected