tinyhumansai/openhuman · error
openhuman.threads_create_new returned no thread id: {created
Error message
openhuman.threads_create_new returned no thread id: {created} What it means
threads_create_new returned a successful RPC payload but no thread id could be extracted from it — a response-shape drift between the TUI's extractor (id/thread_id fields) and what the controller returned. The printed payload shows the actual shape.
Source
Thrown at src/tui/runner.rs:180
.first()
.and_then(|thread| thread.get("id").or_else(|| thread.get("thread_id")))
.and_then(Value::as_str)
{
return Ok(id.to_string());
}
}
Err(error) => {
log::warn!("[tui] openhuman.threads_list failed: {error} — starting a new thread")
}
}
}
let created = runtime
.invoke("openhuman.threads_create_new", json!({}))
.await
.map_err(|e| anyhow::anyhow!("openhuman.threads_create_new failed: {e}"))?;
extract_thread_id(&created).ok_or_else(|| {
anyhow::anyhow!("openhuman.threads_create_new returned no thread id: {created}")
})
}
/// Pull a thread id out of a `threads.create_new` / `threads.list` response,
/// tolerant of the `RpcOutcome` log-envelope wrapping (`{result, logs}`) and the
/// `ApiEnvelope` data wrapping (`{data, meta}`).
pub(super) fn extract_thread_id(value: &Value) -> Option<String> {
// Unwrap the optional `{result, logs}` log envelope first.
let inner = value.get("result").unwrap_or(value);
// Then the optional `{data, meta}` ApiEnvelope.
let payload = inner.get("data").unwrap_or(inner);
payload
.get("id")
.and_then(Value::as_str)
.map(str::to_string)
}
/// Resolve the OpenHuman data dir (host of `logs/`), mirroring the shell'sView on GitHub (pinned to 7491200858)
Solutions
- Inspect the returned JSON in the error to see where the id lives
- Fix the TUI's field extraction to match the threads controller's response schema
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at src/tui/runner.rs:180 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/946d7edec036bffb.
Report an issue: GitHub.