BigPizzaV3/CodexPlusPlus · error · anyhow::Error
thread usage history task failed: {error}
Error message
thread usage history task failed: {error} What it means
Wrapped failure thrown by LauncherDataService::thread_usage_history when the spawn_blocking task around adapter.codex_thread_usage_history fails as a task (JoinError), reported as "thread usage history task failed: {error}". Means the blocking wrapper died (panic/cancel), not that history lookup returned a domain error.
Source
Thrown at apps/codex-plus-launcher/src/main.rs:655
tokio::task::spawn_blocking(move || adapter.undo(&undo_token))
.await
.map_err(|error| anyhow::anyhow!("undo task failed: {error}"))
}
async fn export_markdown(&self, session: SessionRef) -> anyhow::Result<ExportResult> {
let db_paths = self.candidate_db_paths();
tokio::task::spawn_blocking(move || {
codex_plus_data::export_markdown_from_paths(db_paths, &session)
})
.await
.map_err(|error| anyhow::anyhow!("export markdown task failed: {error}"))
}
async fn thread_usage_history(&self, session: SessionRef) -> anyhow::Result<Value> {
let adapter = self.storage_adapter();
tokio::task::spawn_blocking(move || adapter.codex_thread_usage_history(&session))
.await
.map_err(|error| anyhow::anyhow!("thread usage history task failed: {error}"))
}
async fn find_archived_thread_by_title(
&self,
title: String,
) -> anyhow::Result<Option<SessionRef>> {
let adapter = self.storage_adapter();
tokio::task::spawn_blocking(move || adapter.find_archived_thread_by_title(&title))
.await
.map_err(|error| anyhow::anyhow!("archived lookup task failed: {error}"))
}
async fn recover_remote_control_session(&self, thread_id: String) -> anyhow::Result<Value> {
let settings = codex_plus_core::settings::SettingsStore::default()
.load()
.unwrap_or_default();
let profile = settings.active_relay_profile();
if !settings.relay_profiles_enabledView on GitHub (pinned to f2074595a2)
Solutions
- 查看 usage history 任务的 panic 堆栈
- 确认会话引用与数据库路径有效
- 重试查询
- 检查 adapter 内对空结果集的 unwrap 处理
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at apps/codex-plus-launcher/src/main.rs:655 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BigPizzaV3/CodexPlusPlus@f2074595a2 (2026-08-23).
Data as JSON: /api/errors/2ef1af4eea945f12.
Report an issue: GitHub.