You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Archived chats show a Delete button, but deletion does not work #28095
In the Codex app's archived chats / archived threads screen, there is a Delete button, but clicking it does not delete the archived chat.
This makes the UI misleading: the button appears available, but the archived conversation remains and cannot be removed from that screen.
What steps can reproduce the bug?
Open Codex Desktop on macOS.
Go to Settings.
Open the archived chats / archived threads section.
Find an archived conversation.
Click the Delete button shown for that archived chat.
Observe that the archived chat is not deleted.
What is the expected behavior?
Clicking Delete should either permanently remove the archived chat after confirmation, or show a clear error/explanation if deletion is not supported.
Additional information
Suggested fix: either make the Delete button functional in the archived chats screen, or hide/disable it with an explanation if archived chats cannot currently be deleted.
This comment is based on a Codex Desktop issue I reproduced locally. Codex itself identified and troubleshot the local persistence state, then performed a targeted workaround deletion for an earlier affected archived chat by removing the stale local records. My role in that workaround was verification: I restarted the Codex Desktop app and the macOS host, then confirmed the affected archived chat was fully gone.
For this comment, I created a fresh, non-sensitive test thread to reproduce the same bug cleanly. I also used Codex/LLM assistance to summarize the evidence and format this GitHub comment, and I reviewed the contents before posting.
I can reproduce this on Codex Desktop for macOS with that fresh, non-sensitive test thread. I think this is the same bug, and the extra useful detail is that the UI reports success while the archived thread remains in multiple local persistence stores.
Environment
Codex Desktop app: 26.609.41114
App bundle version: 3888
Bundled CLI: codex-cli 0.140.0-alpha.2
App binary version output: Codex 149.0.7827.54
macOS: 26.5.1 / build 25F80
Darwin: 25.5.0 arm64
Affected screen: Settings > Archived chats
Repro
Create a fresh Codex Desktop chat.
Use a simple test prompt:
This is just an example chat to understand Codex's features and capabilities on macOS. Give me top 10 things.
Let Codex respond.
Archive the chat.
Open Settings > Archived chats.
Delete the archived chat.
Actual behavior
Codex shows a success toast:
Deleted 1 archived chat
But the archived row remains visible immediately afterward.
id title archived archived_at created_at updated_at
------------------------------------ -------------------------- -------- ----------- ---------- ----------
019ec6b3-b929-7c81-92dd-f366855b66fa List top 10 macOS features 1 1781450256 1781450127 1781450178
ls -l "$HOME/.codex/archived_sessions/rollout-2026-06-14T20-45-27-019ec6b3-b929-7c81-92dd-f366855b66fa.jsonl"
wc -l "$HOME/.codex/archived_sessions/rollout-2026-06-14T20-45-27-019ec6b3-b929-7c81-92dd-f366855b66fa.jsonl"
stat -f 'size_bytes=%z mtime=%Sm'"$HOME/.codex/archived_sessions/rollout-2026-06-14T20-45-27-019ec6b3-b929-7c81-92dd-f366855b66fa.jsonl"
{"id":"019ec6b3-b929-7c81-92dd-f366855b66fa","thread_name":"List top 10 macOS features","updated_at":"2026-06-14T15:15:32.710214Z"}
logs_2.sqlite still has rows for the same thread:
sqlite3 -header -column "$HOME/.codex/sqlite/logs_2.sqlite""SELECT COUNT(*) AS log_rows_for_threadFROM logsWHERE thread_id='019ec6b3-b929-7c81-92dd-f366855b66fa';"
Output:
log_rows_for_thread
-------------------
1000
Codex also checked .codex-global-state.json without dumping the full file, because it can contain unrelated prompt history. The affected thread id still exists under heartbeat-thread-permissions-by-id in both .codex-global-state.json and .codex-global-state.json.bak.
Workaround that removed an earlier affected archived chat
I did not apply this cleanup to the fresh repro thread above, so that repro evidence remains intact. However, Codex used the same cleanup logic on an earlier affected archived chat on my machine. After Codex removed the stale records, I restarted both Codex and macOS and verified that the earlier archived chat was fully gone.
This is the workaround cleanup logic, parameterized by THREAD_ID. It is not an official fix; it is included only to show which local persistence stores had to be reconciled before the archived chat actually disappeared.
set -euo pipefail
THREAD_ID="replace-with-affected-thread-id"
STATE_DB="$HOME/.codex/sqlite/state_5.sqlite"
LOGS_DB="$HOME/.codex/sqlite/logs_2.sqlite"
SESSION_INDEX="$HOME/.codex/session_index.jsonl"
GLOBAL_STATE="$HOME/.codex/.codex-global-state.json"
GLOBAL_STATE_BAK="$HOME/.codex/.codex-global-state.json.bak"# Capture the rollout path before deleting the thread row.
ARCHIVE_FILE="$( sqlite3 "$STATE_DB"" SELECT rollout_path FROM threads WHERE id='$THREAD_ID';")"
sqlite3 "$STATE_DB"" PRAGMA busy_timeout=5000; PRAGMA foreign_keys=ON; BEGIN IMMEDIATE; DELETE FROM thread_dynamic_tools WHERE thread_id='$THREAD_ID'; DELETE FROM thread_spawn_edges WHERE parent_thread_id='$THREAD_ID' OR child_thread_id='$THREAD_ID'; DELETE FROM threads WHERE id='$THREAD_ID'; COMMIT;"
sqlite3 "$LOGS_DB"" PRAGMA busy_timeout=5000; BEGIN IMMEDIATE; DELETE FROM logs WHERE thread_id='$THREAD_ID'; COMMIT;"if [ -f"$SESSION_INDEX" ];then
tmp="$(mktemp)"
awk -v id="$THREAD_ID"'index($0, id) == 0 { print }'"$SESSION_INDEX">"$tmp"
chmod 0644 "$tmp"
mv "$tmp""$SESSION_INDEX"fiforpin"$GLOBAL_STATE""$GLOBAL_STATE_BAK";doif [ -f"$p" ];then
tmp="$(mktemp)"
jq -c --arg id "$THREAD_ID"' .["electron-persisted-atom-state"]["prompt-history"] |= del(.[$id]) | .["electron-persisted-atom-state"]["heartbeat-thread-permissions-by-id"] |= del(.[$id]) | .["electron-persisted-atom-state"]["projectless-thread-ids"] |= ((. // []) | map(select(. != $id))) | .["electron-persisted-atom-state"]["thread-workspace-root-hints"] |= del(.[$id]) | .["electron-persisted-atom-state"]["thread-projectless-output-directories"] |= del(.[$id])'"$p">"$tmp"
chmod 0644 "$tmp"
mv "$tmp""$p"fidoneif [ -n"${ARCHIVE_FILE:-}" ] && [ -f"$ARCHIVE_FILE" ];then
rm -f "$ARCHIVE_FILE"fi
Interpretation
This looks like the delete handler either:
shows an optimistic success toast before persistence updates actually succeed, or
deletes from one backing store but leaves other stores that can rehydrate the archived-thread UI.
The stores that remained involved in this repro were:
~/.codex/sqlite/state_5.sqlite
~/.codex/sqlite/logs_2.sqlite
~/.codex/session_index.jsonl
~/.codex/archived_sessions/*.jsonl
~/.codex/.codex-global-state.json
~/.codex/.codex-global-state.json.bak
Expected behavior: after the delete action succeeds, the archived row should disappear and should not remain as archived = 1 in local thread state.
Local thread state source: ~/.codex/sqlite/state_5.sqlite
Observed behavior:
An archived chat could not be removed from the desktop UI.
The affected thread still had archived = 1 in threads after the UI-side delete attempt.
The same thread was still referenced by ~/.codex/session_index.jsonl.
The archived rollout file still existed under ~/.codex/archived_sessions/.
Related log rows and persisted app-state entries also remained for the same thread id.
Expected behavior:
When the archived-chat Delete action reports success, the archived row should disappear and the local persistence stores should be reconciled.
If permanent deletion is not supported yet, the archived screen should not show an active Delete action.
Workaround used locally:
Back up the local Codex state files.
Remove the archived thread row and related local references from the local state stores.
Remove the corresponding archived rollout file.
This matches the behavior described in this issue: the UI exposes deletion for archived chats, but the archived chat remains in local persistence afterward.
OS: Windows 11 Education, version 25H2, build 26200.8457, 64-bit
Codex Desktop package: OpenAI.Codex
Package version: 26.609.9530.0
Package full name: OpenAI.Codex_26.609.9530.0_x64__2p2nqsd0c76g0
Codex CLI: codex-cli 0.118.0
UI locale: Korean
Affected screen: Settings > Archived chats
Reproduction Steps
Open Codex Desktop.
Archive an existing chat/thread.
Open Settings > Archived chats.
Click the trash/delete button for an archived chat.
Codex shows a localized success toast indicating that the archived chat was deleted.
The archived chat still remains visible, or appears again after returning to the archived chats screen.
Actual Behavior
The UI reports that the archived chat was deleted, but the archived chat is not actually removed.
Expected Behavior
If deletion is supported, the archived chat should be removed and should not reappear.
If deletion is not supported yet, the UI should not show a successful deletion message. It should show a clear error, or disable/hide the delete action instead.
Notes
I am intentionally not including local thread IDs, local file paths, screenshots, or chat contents that may contain private workspace/chat information.
I have not attempted any manual local-state cleanup. A supported fix or documented safe cleanup method would be helpful.
Disclosure: This follow-up was drafted with Codex from my direct user experience. Codex performed the local troubleshooting and cleanup checks; I reviewed the results. My role here was to verify the visible outcome in the Codex Desktop app and macOS host after restart.
Additional finding: archived chat deletion also appears to leave stale config.toml state behind.
After the archived-chat deletion problem and manual cleanup, Codex found that my local ~/.codex/config.toml still contained trusted project entries for workspaces that no longer existed. The relevant shape was:
That this-is-just-an-example-chat workspace was the clean reproduction chat created for this issue. It had already been deleted from the archived chat store and local filesystem, but the corresponding project trust entry remained in config.toml.
Codex then checked all [projects.*] entries in ~/.codex/config.toml against the filesystem and found multiple stale trust entries whose directories no longer existed. Some were from previously deleted archived/projectless Codex chats. After removing those stale blocks, validation showed:
This looks like a second residue path from the same deletion bug:
Archived chat deletion can report success while the archived chat remains visible.
Manual cleanup can remove the archived session DB/index/log/global-state records and workspace directory.
But ~/.codex/config.toml can still retain [projects."<deleted workspace>"] trust_level = "trusted" entries for deleted archived/projectless chat workspaces.
I am not claiming the stale config.toml entry is what keeps the archived chat visible in the UI. It may be a separate leftover. But it is still persistent local state associated with deleted archived chats, and it means "delete archived chat" does not fully clean the local Codex instance.
Suggested implementation consideration:
When deleting an archived projectless chat whose auto-created workspace is also removed, also remove the matching [projects."<cwd>"] trust entry from ~/.codex/config.toml.
Avoid leaving trusted project entries for workspaces that no longer exist.
Activity
Xkx-AZ commentedon Jun 14, 2026
yeah,I have the same issue just like u
hanjunjeong commentedon Jun 14, 2026
“Windows에서도 재현, ~/.codex/archived_sessions 수동 삭제하면 사라짐”
daryll-swer commentedon Jun 14, 2026
Disclosure
This comment is based on a Codex Desktop issue I reproduced locally. Codex itself identified and troubleshot the local persistence state, then performed a targeted workaround deletion for an earlier affected archived chat by removing the stale local records. My role in that workaround was verification: I restarted the Codex Desktop app and the macOS host, then confirmed the affected archived chat was fully gone.
For this comment, I created a fresh, non-sensitive test thread to reproduce the same bug cleanly. I also used Codex/LLM assistance to summarize the evidence and format this GitHub comment, and I reviewed the contents before posting.
I can reproduce this on Codex Desktop for macOS with that fresh, non-sensitive test thread. I think this is the same bug, and the extra useful detail is that the UI reports success while the archived thread remains in multiple local persistence stores.
Environment
26.609.411143888codex-cli 0.140.0-alpha.2Codex 149.0.7827.5426.5.1/ build25F8025.5.0 arm64Settings > Archived chatsRepro
Create a fresh Codex Desktop chat.
Use a simple test prompt:
Let Codex respond.
Archive the chat.
Open
Settings > Archived chats.Delete the archived chat.
Actual behavior
Codex shows a success toast:
But the archived row remains visible immediately afterward.

In my repro, the still-visible row was:
This Is Just An Example ChatList top 10 macOS features019ec6b3-b929-7c81-92dd-f366855b66faLocal evidence after the delete action
The thread still exists in
state_5.sqliteas archived:Relevant output:
Timestamp conversion:
The archived session file also remains on disk:
Output:
session_index.jsonlstill references it:logs_2.sqlitestill has rows for the same thread:Output:
Codex also checked
.codex-global-state.jsonwithout dumping the full file, because it can contain unrelated prompt history. The affected thread id still exists underheartbeat-thread-permissions-by-idin both.codex-global-state.jsonand.codex-global-state.json.bak.Workaround that removed an earlier affected archived chat
I did not apply this cleanup to the fresh repro thread above, so that repro evidence remains intact. However, Codex used the same cleanup logic on an earlier affected archived chat on my machine. After Codex removed the stale records, I restarted both Codex and macOS and verified that the earlier archived chat was fully gone.
This is the workaround cleanup logic, parameterized by
THREAD_ID. It is not an official fix; it is included only to show which local persistence stores had to be reconciled before the archived chat actually disappeared.Interpretation
This looks like the delete handler either:
The stores that remained involved in this repro were:
~/.codex/sqlite/state_5.sqlite~/.codex/sqlite/logs_2.sqlite~/.codex/session_index.jsonl~/.codex/archived_sessions/*.jsonl~/.codex/.codex-global-state.json~/.codex/.codex-global-state.json.bakExpected behavior: after the delete action succeeds, the archived row should disappear and should not remain as
archived = 1in local thread state.GTC2080 commentedon Jun 14, 2026
Adding another macOS repro.
Environment:
codex-cli 0.140.0-alpha.2~/.codex/sqlite/state_5.sqliteObserved behavior:
archived = 1inthreadsafter the UI-side delete attempt.~/.codex/session_index.jsonl.~/.codex/archived_sessions/.Expected behavior:
Workaround used locally:
This matches the behavior described in this issue: the UI exposes deletion for archived chats, but the archived chat remains in local persistence afterward.
singularitti commentedon Jun 16, 2026
This still happens in the latest build 26.609.71450.
HyunKN commentedon Jun 16, 2026
Adding another Windows reproduction.
Environment
25H2, build26200.8457, 64-bitOpenAI.Codex26.609.9530.0OpenAI.Codex_26.609.9530.0_x64__2p2nqsd0c76g0codex-cli 0.118.0Settings > Archived chatsReproduction Steps
Settings > Archived chats.Actual Behavior
The UI reports that the archived chat was deleted, but the archived chat is not actually removed.
Expected Behavior
If deletion is supported, the archived chat should be removed and should not reappear.
If deletion is not supported yet, the UI should not show a successful deletion message. It should show a clear error, or disable/hide the delete action instead.
Notes
I am intentionally not including local thread IDs, local file paths, screenshots, or chat contents that may contain private workspace/chat information.
I have not attempted any manual local-state cleanup. A supported fix or documented safe cleanup method would be helpful.
Xkx-AZ commentedon Jun 16, 2026
why this issue still exists in the new version?
daryll-swer commentedon Jun 16, 2026
Disclosure: This follow-up was drafted with Codex from my direct user experience. Codex performed the local troubleshooting and cleanup checks; I reviewed the results. My role here was to verify the visible outcome in the Codex Desktop app and macOS host after restart.
Additional finding: archived chat deletion also appears to leave stale
config.tomlstate behind.After the archived-chat deletion problem and manual cleanup, Codex found that my local
~/.codex/config.tomlstill contained trusted project entries for workspaces that no longer existed. The relevant shape was:That
this-is-just-an-example-chatworkspace was the clean reproduction chat created for this issue. It had already been deleted from the archived chat store and local filesystem, but the corresponding project trust entry remained inconfig.toml.Codex then checked all
[projects.*]entries in~/.codex/config.tomlagainst the filesystem and found multiple stale trust entries whose directories no longer existed. Some were from previously deleted archived/projectless Codex chats. After removing those stale blocks, validation showed:This looks like a second residue path from the same deletion bug:
~/.codex/config.tomlcan still retain[projects."<deleted workspace>"] trust_level = "trusted"entries for deleted archived/projectless chat workspaces.I am not claiming the stale
config.tomlentry is what keeps the archived chat visible in the UI. It may be a separate leftover. But it is still persistent local state associated with deleted archived chats, and it means "delete archived chat" does not fully clean the local Codex instance.Suggested implementation consideration:
[projects."<cwd>"]trust entry from~/.codex/config.toml.singularitti commentedon Jun 16, 2026
This seems to be fixed by the latest build 26.611.61049.
Xkx-AZ commentedon Jun 17, 2026
In the latest version ,this issue has been corrected!
2019process commentedon Jun 17, 2026
The latest version has been fixed
WaterWhisperer commentedon Jun 17, 2026
Confirming this is fixed for me after updating Codex Desktop.
HyunKN commentedon Jun 17, 2026
On Windows, this works correctly again in Codex version 26.611.8273.0.