Skip to content

Windows Codex Desktop 26.924: Archive fails from UI ("无法归档对话") and app API, but codex archive CLI succeeds #49116

Open

Description

@xiaotangyeye

Environment
• OS: Windows 11 x64
• Codex Desktop: 26.924.22138 (build 11645), prod channel
• Bundled codex-cli: 0.158.0-alpha.2.1
Summary
On this build, archiving a local thread from the sidebar shows the error 无法归档对话(cannot archive conversation). The archive request never reaches the app server (nothread/archive JSON-RPC in logs). The app-level archive API also fails with Could not determine the account for worktree cleanup. However, the bundled CLI codex archive archives the same thread successfully.
Steps to reproduce

  1. Open Codex Desktop on Windows.
  2. Hover over a local thread in the sidebar, click ⋯ → 归档聊天.
  3. Observe the error 无法归档对话; the thread stays in the active list.
    Actual behavior
    • UI archive fails and the thread is not archived.
    • No thread/archive request appears in the app-server logs (request is blocked client-side).
    • Invoking archive through the app API returns Could not determine the account for worktree cleanup.
    • After archiving successfully via codex archive , the sidebar still shows the stale thread title until the entry is clicked or the app is restarted.
    Expected behavior
    • Archive should work from the sidebar and remove the thread from the active list.
    • The sidebar should refresh immediately after a successful archive.
    Additional context
    • The earlier Windows os error 2archive failure was fixed by PR Deduplicate rollout moves when archiving threads #39256; this appears to be a separate regression in the 26.924 UI/API path.
    • Related: Windows Codex Desktop: archived tasks cannot be deleted, are missing from the web archive, and the archive-first workflow is misleading #46240 (Windows archive/delete workflow gaps), [Windows] Local thread archiving fails with thread-store os error 2 #39130 (os error 2, fixed).

Activity

  1. added
    bug
    app
    windows-os
    app-server
    on Sep 29, 2026
  2. HenryFone commented on Sep 30, 2026

    @HenryFone

    Can confirm the same regression from the UI side on Windows, with a bit more environment detail that may help narrow it down.

    • Codex Desktop: 26.924.2738.0 (build 26.924.22138)
    • Bundled app-server / CLI: codex-cli 0.158.0-alpha.2.1
    • OS: Windows 11 23H2
    • Auth: not signed in to ChatGPT (codex login status -> Not logged in), no auth.json
    • Provider: custom, non-OpenAI, requires_openai_auth = false
    • Last known-good: 26.917.x

    What I see:

    1. Sidebar -> Archive shows "Failed to archive conversation" (无法归档对话); thread stays in the active list.
    2. No thread/archive RPC ever goes out - only "Archive requested", then nothing.
    3. Deleting the exact same conversation works fine, so it is specific to the archive path.
    4. Every conversation in the workspace is affected, including brand-new ones.
    5. Restarting Desktop does not change anything.

    Here the bundled CLI escape hatch does not work either - codex archive <id> returns "Error: failed to archive session".

    Looks like the same client-side preflight issue as #48367 (account lookup for worktree cleanup throwing before the RPC). I am not signed in and would rather keep it that way, so archiving from the UI used to work previously and should keep working for custom-provider users.

  3. HenryFone commented on Oct 1, 2026

    @HenryFone

    Follow-up after more testing on the same machine (Windows 11 23H2, Desktop 26.924.22138, bundled CLI 0.158.0-alpha.2.1):

    Correction to my earlier comment: the CLI Error: failed to archive session I saw there was not the same failure as the UI preflight. It was the thread-writer lock. The desktop app keeps <thread-id>.lock in %USERPROFILE%\.codex\thread-writer-locks\ for sessions it has loaded, and codex archive <id> fails while that lock is held. The lock file is opened with FILE_SHARE_DELETE, so renaming the canonical name out of the way while the app is still running is enough: the next codex archive <id> returned exit 0, the thread flipped to archived in the local state DB, and the rollout moved to archived_sessions. Verified twice on idle threads, and reversible with codex unarchive.

    That still does not explain the UI button in the original report: on my install the sidebar action fails before any RPC is sent (Could not determine the account for worktree cleanup, no thread/archive in the log) - the client-side preflight in #48367, not a lock conflict. So there appear to be two distinct blockers on this build: (a) account/worktree preflight for the UI path, and (b) writer-lock conflicts for the CLI/agent path.

    I wrapped the lock workaround in a small local tool in case it helps others blocked by (b): https://github.com/HenryFone/codex-archive-manager - Windows 11 + 26.924 tested, Python standard library only, binds 127.0.0.1 only, and every state change goes through the official codex archive/unarchive/delete; it never writes the SQLite DB itself. It cannot fix the UI preflight. I understand the writer lock exists to protect concurrent writers, and I am not suggesting it be weakened - the owner-side release/handoff direction discussed in #45406 is the real fix.

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

    appapp-serverbugwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions