{"record":{"id":"1c5a09b82dbc072e","repo":"Kuberwastaken/claurst","slug":"remote-control-requires-a-session-token-set-claur","errorCode":null,"errorMessage":"Remote Control requires a session token.\nSet CLAURST_BRIDGE_TOKEN=<your-token> to enable.\nGet a token from https://claude.ai (Settings → Remote Control).\nNote: Remote Control is only available with claude.ai subscriptions.","messagePattern":"Remote Control requires a session token\\.\nSet CLAURST_BRIDGE_TOKEN=<your-token> to enable\\.\nGet a token from https://claude\\.ai \\(Settings → Remote Control\\)\\.\nNote: Remote Control is only available with claude\\.ai subscriptions\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-rust/crates/bridge/src/lib.rs","lineNumber":938,"sourceCode":"///\r\n/// ```rust,no_run\r\n/// # tokio::runtime::Runtime::new().unwrap().block_on(async {\r\n/// match claurst_bridge::start_bridge_session(None).await {\r\n///     Ok(info) => println!(\"Session URL: {}\", info.session_url),\r\n///     Err(e) => eprintln!(\"Could not start bridge: {e}\"),\r\n/// }\r\n/// # });\r\n/// ```\r\npub async fn start_bridge_session(\r\n    token_override: Option<String>,\r\n) -> anyhow::Result<BridgeSessionInfo> {\r\n    // Resolve auth token.\r\n    let token = token_override\r\n        .or_else(|| std::env::var(\"CLAURST_BRIDGE_TOKEN\").ok())\r\n        .or_else(|| std::env::var(\"CLAUDE_BRIDGE_OAUTH_TOKEN\").ok())\r\n        .filter(|t| !t.is_empty())\r\n        .ok_or_else(|| {\r\n            anyhow::anyhow!(\r\n                \"Remote Control requires a session token.\\n\\\r\n                 Set CLAURST_BRIDGE_TOKEN=<your-token> to enable.\\n\\\r\n                 Get a token from https://claude.ai (Settings → Remote Control).\\n\\\r\n                 Note: Remote Control is only available with claude.ai subscriptions.\"\r\n            )\r\n        })?;\r\n\r\n    // Resolve server base URL.\r\n    let server_url = std::env::var(\"CLAURST_BRIDGE_URL\")\r\n        .or_else(|_| std::env::var(\"CLAUDE_BRIDGE_BASE_URL\"))\r\n        .unwrap_or_else(|_| \"https://claude.ai\".to_string());\r\n\r\n    let session_id = uuid::Uuid::new_v4().to_string();\r\n\r\n    let hostname = {\r\n        hostname::get()\r\n            .map(|h| h.to_string_lossy().into_owned())\r\n            .unwrap_or_else(|_| \"unknown\".to_string())\r","sourceCodeStart":920,"sourceCodeEnd":956,"githubUrl":"https://github.com/Kuberwastaken/claurst/blob/b0637c97ec34144387cbf2f74f65df6d16a6cef1/src-rust/crates/bridge/src/lib.rs#L920-L956","documentation":"This is the user-facing startup error for the Remote Control bridge when no session token can be resolved. The start path tries (in order): an explicit token override, the CLAURST_BRIDGE_TOKEN env var, and the CLAUDE_BRIDGE_OAUTH_TOKEN env var; if all are missing or empty, it fails with instructions on how to enable Remote Control. It also documents that Remote Control requires a claude.ai subscription.","triggerScenarios":"Starting the bridge (the function at bridge/src/lib.rs:938) with no `token_override`, no `CLAURST_BRIDGE_TOKEN`, and no `CLAUDE_BRIDGE_OAUTH_TOKEN` env var — or all present but empty strings (filtered by `.filter(|t| !t.is_empty())`).","commonSituations":"User runs Remote Control on a fresh machine without exporting the token; token set to empty string in shell config; user has an API-key-only (non-subscription) account where no bridge token exists; token env var name misspelled.","solutions":["Get a token from claude.ai (Settings → Remote Control) and run `export CLAURST_BRIDGE_TOKEN=<your-token>` before starting.","Alternatively set `CLAUDE_BRIDGE_OAUTH_TOKEN` if you obtained an OAuth bridge token.","Check the variable is non-empty: `echo \"${CLAURST_BRIDGE_TOKEN:?not set}\"`.","If you have no subscription, Remote Control is unavailable — use the app without it."],"exampleFix":"// before\n$ ./claurst  # Remote Control requires a session token...\n// after\n$ export CLAURST_BRIDGE_TOKEN=eyJhbGci...\n$ ./claurst","handlingStrategy":"validation","validationCode":"// Shell preflight before launching\n[ -n \"$CLAURST_BRIDGE_TOKEN\" ] || [ -n \"$CLAUDE_BRIDGE_OAUTH_TOKEN\" ] || { echo \"Set CLAURST_BRIDGE_TOKEN (claude.ai Settings -> Remote Control)\"; exit 1; }","typeGuard":null,"tryCatchPattern":"// Rust caller: surface the actionable message instead of a raw trace\nif let Err(e) = start_bridge(token_override).await {\n    eprintln!(\"{e:#}\"); // prints the multi-line setup instructions\n    std::process::exit(2);\n}","preventionTips":["Store CLAURST_BRIDGE_TOKEN in your shell profile or direnv config.","Verify the variable is non-empty after editing shell config (empty strings are filtered out).","Confirm your account has a claude.ai subscription before enabling Remote Control."],"tags":["bridge","remote-control","authentication","env-var","setup"],"backgroundTag":"missing-env-var","analyzedSha":"b0637c97ec34144387cbf2f74f65df6d16a6cef1","analyzedAt":"2026-09-10T00:24:58.650Z","contentChangedAt":"2026-09-10T00:24:58.650Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}