Skip to content

[Windows][Codex Desktop] Archived Delete all aborts when one thread is referenced by an active fork #40365

Open

Description

@berkyuo2-cpu

Summary

On Windows, Settings > Archived chats > Delete all aborts the whole operation when one archived paginated thread is still referenced as history_base by an active fork. The UI only shows a generic failure toast and leaves every archived thread in place.

Environment

  • Windows 10.0.19045 x64
  • Codex Desktop package: 26.818.5229.0
  • Bundled app-server / CLI runtime: 0.149.0-alpha.4.1
  • Local archived Codex threads visible in the UI: 121

Reproduction and evidence

  1. Keep an active fork whose session metadata has history_base.thread_id pointing to an archived paginated parent.
  2. Open Settings > Archived chats. The referenced parent is the first listed archived item.
  3. Choose Delete all and confirm.
  4. The UI shows the generic localized equivalent of Archived chats could not be deleted. No visible archived thread is removed.

Sending thread/delete for that first parent directly to the bundled app-server returns JSON-RPC code -32600 with:

cannot delete thread <parent>: forked history still references it

Using the same bundled supported CLI path, codex delete --force , successfully deleted the other 120 visible archived threads. The referenced parent correctly remained protected. This isolates the bulk failure to one protected item rather than general filesystem corruption or permissions.

Expected behavior

Delete all should process items independently or preflight the full set. It should:

  • delete every deletable archived thread;
  • skip the fork-referenced parent;
  • report the exact protected-thread reason and the number deleted/skipped;
  • avoid reducing an intentional referential-integrity guard to a generic all-or-nothing error.

Related

I am omitting the screenshot and real thread IDs because they contain private task titles. The exact error, versions, counts, and before/after behavior above were captured from the live Windows installation.

Activity

  1. added
    bug
    app
    windows-os
    session
    on Aug 24, 2026
  2. edwardswhiskeyblues-alt commented on Oct 24, 2026

    @edwardswhiskeyblues-alt

    Additional current-build repro: single-item sidebar delete hides the active-fork dependency

    The affected user explicitly requested this sanitized follow-up. This appears to be the same protected-parent condition, now reproduced through the single-task permanent-delete action in the main sidebar, rather than Archived chats > Delete all.

    Environment

    • Windows 11 Pro 26H2, build 26300.9711, x64
    • Codex Desktop package 26.1016.8622.0
    • Bundled CLI codex-cli 0.163.0-alpha.11.2

    Reproduction

    1. Create a sequence of same-directory forks: A -> B -> C -> D.
    2. Keep the newest descendant D as the active canonical task; the older ancestors are idle/not loaded.
    3. In the main Codex sidebar, use the task menu to permanently delete ancestor A or B individually.
    4. Confirm the deletion action.

    Actual behavior

    • The operation is refused.
    • A generic red UI error says only Cannot delete task.
    • The task remains present.
    • The UI does not say that the selected task is retained because forked history still references it, does not identify/count affected descendants, and does not explain that permanent deletion has descendant-wide semantics.
    • Restarting/compacting an ancestor does not provide a meaningful path forward.

    No direct thread/delete, manual state edit, or codex delete --force was attempted, specifically to avoid deleting the active descendant lineage.

    Why this matters
    The refusal itself is safe, but the unexplained toast makes a referential-integrity guard look like corruption or a transient failure. A user may repeatedly retry, compact unrelated tasks, manually alter local state, or escalate to codex delete --force. Official app-server behavior documents that thread/delete removes the selected thread and spawned descendant threads, so an uninformed workaround can cause permanent loss of the active successor.

    Expected behavior
    Before confirmation, or in the refusal UI, show a dependency-specific message such as:

    This task cannot be deleted independently because it is referenced by 3 descendant forks. Deleting this lineage would also remove those descendants.

    The dialog should:

    • distinguish a protected fork ancestor from filesystem/database/permission failure;
    • show the descendant count and preferably the affected task names;
    • provide Cancel and View descendants (or equivalent);
    • never suggest blind retry for a deterministic dependency condition;
    • document whether deleting only an ancestor while retaining descendants is unsupported.

    Scope / evidence limits

    • This confirms the user-visible single-delete UX gap on a newer Windows build.
    • It does not assert a new backend defect beyond the already described fork-reference protection.
    • Private task names, thread IDs, project contents, and local paths are intentionally omitted.
  3. Mapotofsky commented on Oct 24, 2026

    @Mapotofsky

    Additional reproduction on 2026-10-24: individual deletion from Settings > Archived chats still hides the fork-history reason.

    • Windows desktop package: 26.1021.3705.0
    • Actual bundled app-server: 0.164.0-alpha.11.1
    • All 7 visible local archived chats failed individual deletion with only “无法删除已归档的聊天” (“Failed to delete archived chat”).
    • Direct thread/delete requests to that installed app-server returned -32600: cannot delete thread <redacted>: forked history still references it.
    • Read-only history_base.thread_id inspection confirmed unarchived fork conversations depend on those archived histories, including references through historical rollout segments.
    • No original chats were deleted; the user wants to retain the unarchived forks.

    The requested fix is frontend error clarity, while retaining the backend integrity protection:

    1. Display a specific localized reason, e.g. “此聊天的历史仍被其他分叉聊天引用,暂时无法删除。直接删除会影响这些聊天。”
    2. Provide View referencing chats with navigation/counts, including indirect references where available.
    3. Put the technical error/code in expandable, copyable details.
    4. Explain supported ways to preserve forks while resolving dependencies, if available; do not automatically delete other chats.
    5. Prefer a distinct structured backend error identifier over matching an English message. For bulk deletion, show deleted/skipped counts and reasons.

    Real thread IDs, chat titles, account identifiers, local paths, transcripts, and raw logs have been omitted. This is additional current-version evidence for this existing issue, not a request to bypass the history-reference guard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugsessionwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions