BigPizzaV3/CodexPlusPlus · error · anyhow::Error
undo task failed: {error}
Error message
undo task failed: {error} What it means
Wrapped failure thrown by LauncherDataService::undo: the spawn_blocking task calling adapter.undo panicked or was cancelled, surfaced as "undo task failed: {error}" (a JoinError). A successful task that internally fails returns the undo's own error instead — this message specifically means the blocking wrapper died.
Source
Thrown at apps/codex-plus-launcher/src/main.rs:639
let db_paths = self.candidate_db_paths();
let backup_store = codex_plus_data::BackupStore::new(self.backup_dir.clone());
tokio::task::spawn_blocking(move || {
codex_plus_data::delete_local_from_paths(
db_paths,
backup_store,
&session,
Some(&codex_plus_core::codex_sqlite::default_codex_home_dir()),
)
})
.await
.map_err(|error| anyhow::anyhow!("delete task failed: {error}"))
}
async fn undo(&self, undo_token: String) -> anyhow::Result<DeleteResult> {
let adapter = self.storage_adapter();
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}"))
}
View on GitHub (pinned to f2074595a2)
Solutions
- 查看日志中 undo 任务 panic 的堆栈
- 确认 undo token 与备份文件状态合法(空/损坏 token 可能触发内部 panic 路径)
- 重试撤销操作
- 修复 adapter.undo 内缺少校验而直接 unwrap 的代码路径
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at apps/codex-plus-launcher/src/main.rs:639 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/4c110699260d68c8.
Report an issue: GitHub.