tinyhumansai/openhuman · error

cost tracker unavailable (cached failure, retry in {:?}): {e

Error message

cost tracker unavailable (cached failure, retry in {:?}): {err}

What it means

The cost RPC fallback path cannot produce a cost tracker: the global registry lookup missed, and the previously cached attempt to build a per-workspace tracker failed and is still inside its backoff window (the retry interval is interpolated into the message). Rather than hammering a broken init path on every RPC call, the failure is cached for a bounded period; during that window tracker-dependent calls return this error. Common root causes are a corrupt or locked cost database under the workspace or transient filesystem errors at tracker construction.

Source

Thrown at src/openhuman/platform/cost/rpc.rs:342

    log::warn!(target: "cost_rpc", "[cost_rpc] resolve_tracker.global_miss — falling back to per-call tracker");

    let workspace = config.workspace_dir.clone();
    let mut guard = FALLBACK_TRACKER.lock();

    // Reuse the cached tracker only when the workspace path is unchanged.
    if let Some(state) = guard.as_ref() {
        if state.workspace == workspace {
            if let Some(tracker) = &state.tracker {
                log::debug!(target: "cost_rpc", "[cost_rpc] resolve_tracker.fallback_cached_hit");
                return Ok(tracker.clone());
            }
            if let Some((when, err)) = &state.last_error {
                if when.elapsed() < FALLBACK_ERROR_TTL {
                    log::debug!(
                        target: "cost_rpc",
                        "[cost_rpc] resolve_tracker.fallback_cached_error replay — err={err}"
                    );
                    return Err(anyhow!(
                        "cost tracker unavailable (cached failure, retry in {:?}): {err}",
                        FALLBACK_ERROR_TTL - when.elapsed()
                    ));
                }
            }
        }
    }

    match CostTracker::new(config.cost.clone(), &workspace) {
        Ok(tracker) => {
            log::debug!(target: "cost_rpc", "[cost_rpc] resolve_tracker.fallback_ready workspace={}", workspace.display());
            let arc = Arc::new(tracker);
            *guard = Some(FallbackState {
                workspace,
                tracker: Some(arc.clone()),
                last_error: None,
            });
            Ok(arc)

View on GitHub (pinned to 7491200858)

Solutions

  1. Wait for the backoff window shown in the message to elapse — the next call retries construction
  2. Check the workspace cost database for corruption or lock contention (another process holding it)
  3. Restart the core to clear the cached-failure state immediately if the underlying cause is fixed
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/openhuman/platform/cost/rpc.rs:342 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/8e13380f19675d27. Report an issue: GitHub.