tinyhumansai/openhuman · error
failed to read stored composio api key: {e}
Error message
failed to read stored composio api key: {e} What it means
In direct mode, reading the keychain-stored Composio API key (security::credentials::get_composio_api_key) failed. This is a credential-store read failure, not a missing key — the subsequent code falls back to config.toml only when the read returns Ok(None).
Source
Thrown at src/openhuman/integrations/composio/client.rs:822
match mode {
// Empty string is treated as the default for forward compatibility
// with hand-edited configs that omit the field — `serde(default)`
// already gives us "backend" for missing fields, but a literal
// empty string in TOML would otherwise be rejected.
"" | MODE_BACKEND_PAT => {
let client = build_composio_client(config).ok_or_else(|| {
anyhow::anyhow!(
"composio backend mode unavailable: no backend session token. \
Sign in first (auth_store_session)."
)
})?;
tracing::debug!("[composio-factory] resolved backend variant");
Ok(ComposioClientKind::Backend(client))
}
MODE_DIRECT_PAT => {
// Prefer keychain-stored key; fall back to `config.toml`.
let stored = crate::openhuman::security::credentials::get_composio_api_key(config)
.map_err(|e| anyhow::anyhow!("failed to read stored composio api key: {e}"))?;
let api_key = stored
.or_else(|| {
config
.composio
.api_key
.as_ref()
.map(|k| k.trim().to_string())
.filter(|k| !k.is_empty())
})
.ok_or_else(|| {
anyhow::anyhow!(
"composio direct mode selected but no api key is configured \
(set via composio.set_api_key RPC or config.composio.api_key)"
)
})?;
let tool = create_direct_composio_tool_for_api_key(config, &api_key)?;
tracing::debug!(View on GitHub (pinned to 7491200858)
Solutions
- Check the keyring/keychain backend is available and unlocked
- Re-store the Composio API key via composio.set_api_key
- As a workaround set config.composio.api_key in config.toml once the read failure is resolved
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at src/openhuman/integrations/composio/client.rs:822 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/03ea4a9ad72d58ea.
Report an issue: GitHub.