jlcodes99/cockpit-tools · error
[Codex Batch Delete] 自动清理已完成任务失败:
Error message
[Codex Batch Delete] 自动清理已完成任务失败:
What it means
Best-effort cleanup warning in confirmCodexDelete of the Codex overview controller: after a batch delete job finished and accounts were refreshed, the call that auto-clears the completed job from the backend job list threw; it is caught and logged as '[Codex Batch Delete] 自动清理已完成任务失败:'. The deletion itself already succeeded — only hiding the finished job entry failed.
Source
Thrown at src/pages/useCodexAccountsOverviewController.tsx:1371
selected,
setDeleteConfirm,
t,
]);
const confirmCodexDelete = useCallback(async () => {
if (!deleteConfirm || batchDeleteBusy) return;
setBatchDeleteBusy(true);
setBatchDeleteModalError(null);
batchDeleteRemoveIdsRef.current = new Set(deleteConfirm.ids);
try {
const job = await codexService.startCodexBatchDelete(deleteConfirm.ids);
batchDeleteRefreshedCompletedRef.current = 0;
if (shouldAutoHideBatchDeleteJob(job)) {
await refreshAccountsAfterBatchDelete();
try {
await codexService.clearCodexBatchDelete(job.jobId);
} catch (clearError) {
console.warn(
"[Codex Batch Delete] 自动清理已完成任务失败:",
clearError,
);
}
setBatchDeleteJob(null);
} else {
setBatchDeleteJob(job);
}
setSelected((prev) => {
const next = new Set(prev);
deleteConfirm.ids.forEach((id) => next.delete(id));
return next;
});
setIsAllFilteredSelected(false);
setDeleteConfirm(null);
// 用成功提示覆盖页顶旧错误,避免删除后红色报错仍挂着(#1160)
setMessage({
text: t("codex.batchDelete.started", {View on GitHub (pinned to 1ed8b77992)
Solutions
- Ignore for correctness — deleted accounts are already refreshed; the completed job entry may linger in the UI
- Clear the job manually via the batch-delete job list if it stays visible
- Check codexService cleanup IPC for intermittent backend errors if it recurs
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/pages/useCodexAccountsOverviewController.tsx:1371 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of jlcodes99/cockpit-tools@1ed8b77992 (2026-09-05).
Data as JSON: /api/errors/30592adb323865da.
Report an issue: GitHub.