{"record":{"id":"c2829398b3e7b34b","repo":"tinyhumansai/openhuman","slug":"composio-backend-mode-unavailable-no-backend-sess","errorCode":null,"errorMessage":"composio backend mode unavailable: no backend session token. Sign in first (auth_store_session).","messagePattern":"composio backend mode unavailable: no backend session token\\. Sign in first \\(auth_store_session\\)\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/integrations/composio/client.rs","lineNumber":811,"sourceCode":"///   stored key takes precedence so the encrypted keychain remains the\n///   source of truth — `config.toml` is a fallback for power users.\n///\n/// Any other mode string is rejected with an explicit error so a typo\n/// in `config.toml` fails loud instead of silently downgrading.\npub fn create_composio_client(\n    config: &crate::openhuman::config::Config,\n) -> anyhow::Result<ComposioClientKind> {\n    let mode = config.composio.mode.trim();\n    tracing::debug!(mode = %mode, \"[composio-factory] resolving client\");\n\n    match mode {\n        // Empty string is treated as the default for forward compatibility\n        // with hand-edited configs that omit the field — `serde(default)`\n        // already gives us \"backend\" for missing fields, but a literal\n        // empty string in TOML would otherwise be rejected.\n        \"\" | MODE_BACKEND_PAT => {\n            let client = build_composio_client(config).ok_or_else(|| {\n                anyhow::anyhow!(\n                    \"composio backend mode unavailable: no backend session token. \\\n                     Sign in first (auth_store_session).\"\n                )\n            })?;\n            tracing::debug!(\"[composio-factory] resolved backend variant\");\n            Ok(ComposioClientKind::Backend(client))\n        }\n        MODE_DIRECT_PAT => {\n            // Prefer keychain-stored key; fall back to `config.toml`.\n            let stored = crate::openhuman::security::credentials::get_composio_api_key(config)\n                .map_err(|e| anyhow::anyhow!(\"failed to read stored composio api key: {e}\"))?;\n            let api_key = stored\n                .or_else(|| {\n                    config\n                        .composio\n                        .api_key\n                        .as_ref()\n                        .map(|k| k.trim().to_string())","sourceCodeStart":793,"sourceCodeEnd":829,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/integrations/composio/client.rs#L793-L829","documentation":"create_composio_client in backend mode (the default) found no stored backend session token, so the backend-proxied Composio client cannot be built. Signing in is a prerequisite: the backend proxies Composio calls using the session token.","triggerScenarios":"Thrown at src/openhuman/integrations/composio/client.rs:811 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Sign in first via auth_store_session (the desktop sign-in flow)","Switch config.composio.mode to \"direct\" and configure a Composio API key if backend proxying is not wanted"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}