tinyhumansai/openhuman · error

failed to open memory client for notion cleanup target…

Error message

failed to open memory client for notion cleanup target discovery: {error}

What it means

During connection deletion, notion_memory_targets_for_connection could not open a MemoryClient against the workspace dir when discovering which memory sources to clean up for the notion connection. Target discovery aborts, so the delete cannot proceed safely.

Solutions

  1. Check the workspace dir is accessible and not locked by another process
  2. Retry the disconnect — transient store open failures occur if the memory module is mid-operation
  3. Inspect the underlying {error} for a corrupted-store or permission cause
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/openhuman/integrations/composio/ops/memory_cleanup.rs:92 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/3012be6de62c74e4. Report an issue: GitHub.

Appendix: source

Thrown at src/openhuman/integrations/composio/ops/memory_cleanup.rs:92

fn gmail_memory_sources_for_connection(connection_id: &str) -> Vec<MemoryCleanupTarget> {
    vec![
        MemoryCleanupTarget::Owner(SourceKind::Email, format!("gmail-sync:{connection_id}")),
        MemoryCleanupTarget::Exact(SourceKind::Email, format!("gmail:{connection_id}")),
        MemoryCleanupTarget::Prefix(SourceKind::Email, format!("gmail:{connection_id}:")),
        MemoryCleanupTarget::Prefix(SourceKind::Email, format!("gmail:{connection_id}/")),
    ]
}

async fn notion_memory_targets_for_connection(
    config: &Config,
    connection_id: &str,
) -> anyhow::Result<Vec<MemoryCleanupTarget>> {
    let mut targets = connection_scoped_document_targets("notion", connection_id);

    let memory = Arc::new(
        MemoryClient::from_workspace_dir(config.workspace_dir.clone()).map_err(|error| {
            anyhow::anyhow!(
                "failed to open memory client for notion cleanup target discovery: {error}"
            )
        })?,
    );
    let adapter = tinymemory_core::tinycortex::HostSyncAdapter::new(memory);
    let state = tinycortex::memory::sync::SyncState::load(&adapter, "notion", connection_id)
        .await
        .map_err(|error| {
            anyhow::anyhow!("failed to load notion sync state for memory cleanup: {error}")
        })?;
    for raw_id in state.synced_ids {
        let Some(page_id) = notion_synced_page_id(&raw_id) else {
            continue;
        };
        targets.push(MemoryCleanupTarget::Exact(
            SourceKind::Document,
            format!("notion:{page_id}"),
        ));

View on GitHub (pinned to 7491200858)