Skip to content

fix(codex): clean orphaned desktop task records - #4

Merged
jinghaihan merged 3 commits into
mainfrom
fix/cleanup-automation-runs
Aug 18, 2026
Merged

jinghaihan merged 3 commits into
mainfrom
fix/cleanup-automation-runs

Conversation

@jinghaihan

@jinghaihan jinghaihan commented Aug 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • surface orphaned Codex Desktop sidebar tasks from local_thread_catalog
  • surface orphaned scheduled runs from automation_runs
  • delete selected sidebar, timeline, inbox, and automation index records transactionally
  • preserve the official codex delete --force flow for threads that still exist
  • skip sqlite-backed integration tests when the system sqlite3 binary is unavailable

Root cause

Codex Desktop keeps normal thread data, sidebar catalog entries, and scheduled-run entries in separate stores. Deleting the thread removed it from state_*.sqlite, but stale local_thread_catalog or automation_runs rows could still repopulate the sidebar after restart. Those menu items then failed to open because the underlying thread no longer existed.

Validation

  • pnpm test --run — 12 tests passed locally
  • pnpm typecheck
  • pnpm lint
  • pnpm build
  • Windows, Ubuntu, and macOS CI all passed on the final commit
  • read-only local acceptance detected all 13 visible orphaned catalog entries matching the reported sidebar titles

@jinghaihan
jinghaihan force-pushed the fix/cleanup-automation-runs branch from 6e4bd56 to fff68d4 Compare August 18, 2026 13:09
@jinghaihan jinghaihan changed the title fix(codex): clean orphaned automation runs fix(codex): clean orphaned desktop task records Aug 18, 2026
@jinghaihan
jinghaihan marked this pull request as ready for review August 18, 2026 13:16
@jinghaihan
jinghaihan merged commit 081ac9e into main Aug 18, 2026
5 checks passed
@jinghaihan
jinghaihan deleted the fix/cleanup-automation-runs branch August 18, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant