tinyhumansai/openhuman · error · anyhow::Error

tinyagents harness run failed

Error message

tinyagents harness run failed: {e}

What it means

The boxed tinyagents harness invoke() for a turn failed before producing a run. The surrounding code (#4469 item 3) recovers from a poisoned error-recovery mutex via into_inner so a previously-panicked thread doesn't mask the original provider failure with a second panic — this wrap is the surfaced original harness error (provider unreachable, harness config invalid, etc.).

Solutions

  1. Inspect the inner tinyagents error for the root cause (provider vs config vs harness)
  2. Fix provider/model configuration and retry the turn
  3. If a panic preceded it, check logs for the original panic site that poisoned the slot
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/openhuman/agent/tinyagents/mod.rs:439 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/a075ccd1e6ac0a9f. Report an issue: GitHub.

Appendix: source

Thrown at src/openhuman/agent/tinyagents/mod.rs:439

    let request_base_len = input.len();
    // Box the (large) harness drive future — see `run_turn_via_tinyagents_shared`.
    let run = match Box::pin(harness.invoke(&(), (), config, input)).await {
        Ok(run) => run,
        Err(e) => {
            // #4469 item 3: recover from a poisoned slot instead of panicking.
            // A thread that panicked mid-run while holding this mutex would
            // otherwise turn every subsequent error-recovery read into a second
            // panic, masking the original provider failure. `into_inner` yields
            // the guarded value regardless of poison so we still re-surface the
            // typed error.
            if let Some(original) = error_slot
                .lock()
                .unwrap_or_else(std::sync::PoisonError::into_inner)
                .take()
            {
                return Err(original);
            }
            return Err(anyhow::anyhow!("tinyagents harness run failed: {e}"));
        }
    };

    let text = run.text().unwrap_or_default();
    let out_history = crate::openhuman::agent::message_convert::messages_to_history(&run.messages);
    let conversation = crate::openhuman::agent::message_convert::messages_to_conversation(
        crate::openhuman::agent::message_convert::messages_since_request(
            &run.messages,
            request_base_len,
        ),
    );
    tracing::debug!(
        request_base_len,
        transcript_len = run.messages.len(),
        persisted_messages = run.messages.len().saturating_sub(request_base_len),
        "[tinyagents] persisting post-request transcript (thin path; steer-safe boundary)"
    );

View on GitHub (pinned to 7491200858)