tinyhumansai/openhuman · error

failed to load notion sync state for memory cleanup: {error}

Error message

failed to load notion sync state for memory cleanup: {error}

What it means

The notion sync-state load (via HostSyncAdapter over the opened MemoryClient) failed while enumerating cleanup targets for a connection being deleted. Without the sync state the exact notion document targets cannot be determined.

Source

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

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}"),
        ));
        targets.push(MemoryCleanupTarget::Exact(
            SourceKind::Document,
            format!("composio-notion-page-{page_id}"),
        ));
    }

    Ok(dedupe_memory_targets(targets))
}

View on GitHub (pinned to 7491200858)

Solutions

  1. Retry the disconnect after the sync state settles
  2. Check the underlying {error} for a store corruption or schema mismatch
  3. Re-run the notion sync once, then disconnect again
Defensive patterns

Strategy: fallback

When it happens

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