tinyhumansai/openhuman · error

scan task failed: {e}

Error message

scan task failed: {e}

What it means

The spawned blocking scan task that walks directories matching the glob panicked or was cancelled, and its JoinError is surfaced here. The filesystem walk itself failed mid-scan — not a pattern or argument problem.

Source

Thrown at src/openhuman/tools/impl/filesystem/glob_search.rs:214

        // `base` is already canonical (validate_path canonicalizes), so if this
        // fallback fires the two roots become asymmetric and strip_prefix below
        // may miss for an in-sandbox hit, rendering it absolute. Harmless: the
        // absolute path is still readable and the per-hit filter still applies.
        let action_root = tokio::fs::canonicalize(&path_policy.action_dir)
            .await
            .unwrap_or_else(|e| {
                log::trace!(
                    "[tools:glob] action_dir canonicalize fallback: path='{}' error={e}",
                    path_policy.action_dir.display()
                );
                path_policy.action_dir.clone()
            });

        let result = tokio::task::spawn_blocking(move || {
            collect_matches(&base, &action_root, &path_policy, &pattern, max_results)
        })
        .await
        .map_err(|e| anyhow::anyhow!("scan task failed: {e}"))?;

        let (paths, truncated) = result;
        log::debug!(
            "[tools:glob] scan complete: {} match(es) truncated={}",
            paths.len(),
            truncated
        );
        let header = if truncated {
            format!("{} match(es) (truncated at {max_results})", paths.len())
        } else {
            format!("{} match(es)", paths.len())
        };

        let mut body = String::with_capacity(paths.len() * 32 + header.len() + 1);
        body.push_str(&header);
        for p in paths {
            body.push('\n');
            body.push_str(&p);

View on GitHub (pinned to 7491200858)

Solutions

  1. Retry — join failures are often transient (task cancellation or runtime shutdown)
  2. Narrow the pattern/path to reduce scan depth and I/O pressure
  3. Check core logs for a panic backtrace from the scan task
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at src/openhuman/tools/impl/filesystem/glob_search.rs:214 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/9d0455c90599f87d. Report an issue: GitHub.