Windows Desktop 26.803: config.toml is atomically truncated and existing project tasks disappear from the sidebar
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- PR merge metrics
- PR metrics pending
Description
What version of the Codex App are you using?
Microsoft Store package: OpenAI.Codex_26.803.5235.0_x64
What platform is your computer?
Windows 11 Enterprise LTSC, version 10.0.26100, x64.
Summary
During one incident, Codex Desktop rewrote %USERPROFILE%\.codex\config.toml from 17,845 bytes to 4,267 bytes, removing many unrelated settings. Existing local project tasks then appeared to be lost from the sidebar, although the session files, thread rows, project assignments, and conversation contents were still intact.
This looks like two related state-reconciliation failures:
- a config processor/layer writer replaced a complete valid config with a much smaller partial config;
- the Desktop sidebar/catalog stopped surfacing active project tasks that remained healthy in the core database.
No raw config, transcripts, databases, internal project names, task IDs, credentials, or proprietary logs are attached to this public report.
Timeline (2026-08-10, UTC+8)
- 10:05:53 — A valid edit added one MCP server section to the existing config. The successful diff was additive only; no unrelated field was removed.
- 10:12:05–10:15:18 —
logs_2.sqliterepeatedly recorded activity from:codex_app_server::request_processors::config_processorcodex_config::loader::layer_io
- 10:16:14 —
config.tomlwas replaced/re-written in one operation and shrank from 17,845 bytes to 4,267 bytes. Many unrelated settings disappeared. - Afterward, the selected local project remained registered, but the sidebar showed only the current task and omitted older active tasks.
- A full app restart did not restore the missing tasks.
- Restoring the config from a known-good backup survived a subsequent restart, but the sidebar task visibility problem remained.
The logs available locally do not contain the OS-level writer PID, so attribution to a specific process cannot be proven. However, no shell command or agent tool call in the incident window deleted, moved, copied over, or reset the config/session/state files.
Evidence that conversation data was not deleted
Read-only diagnostics showed:
PRAGMA quick_checkandPRAGMA integrity_checkonstate_5.sqlite: ok- 63 active session rollout files and 31 archived rollout files still existed globally.
- The affected project had 23 thread rows in the core database.
- Eight top-level task assignments for the project were still present (the current task plus seven older tasks).
- At least six older top-level tasks were active/unarchived but absent from the normal sidebar.
- The project assignment metadata was correct.
- The project was registered and marked expanded.
- The missing task IDs had no persisted deleted flag.
- Direct thread reads returned the original turn history.
- Direct navigation by task ID opened the supposedly missing task successfully.
- Opening a missing task did not add it back to the ordinary list.
- Pinning the same task made it immediately appear in the sidebar. Pinning the other missing tasks made all of them visible again.
This strongly suggests a Desktop sidebar/catalog/index inconsistency, not transcript loss.
Persisted sidebar state observation
The persisted Desktop state contained:
mode=project
chatSortMode=priority
projectSortMode=priority
projectExpanded=true
The user did not intentionally select Priority mode. This is reported only as an observed persisted state value, not as a user action or proven root cause.
The official troubleshooting workaround to switch to Chronological did not explain why active assigned tasks were omitted from the project view, or why pinning forced them back into the list.
Reproduction / diagnostic sequence
The original failure is intermittent, but this sequence reproduces the visibility inconsistency on the affected profile:
- Start Codex Desktop with an existing local project containing multiple active tasks.
- Observe that only the current task is shown under the project.
- Restart the application; the older active tasks remain missing.
- Verify that the project and task assignments still exist in the core state database.
- Read or navigate to a missing task by its ID; its history opens normally.
- Return to the sidebar; the task is still absent from the ordinary list.
- Pin the task through the supported app thread API.
- The task appears immediately in the pinned list.
For the config portion:
- Start with a valid multi-section
config.toml. - Apply a valid additive MCP-server edit.
- Allow the running Desktop app to process/reload configuration.
- In the affected incident, the config was later replaced with a much smaller partial file, dropping unrelated settings.
Expected behavior
- A valid additive config edit must preserve all unrelated settings.
- Desktop config reconciliation must never replace a complete config with a partial serialization.
- Active, unarchived tasks with valid rollout files and project assignments must remain visible and searchable.
- Opening or restarting the app must not make existing project tasks appear deleted.
- If the sidebar catalog diverges from the core database, Desktop should rebuild it automatically or provide a supported “Reindex local tasks” action.
Actual behavior
- A complete config was replaced by a 4,267-byte partial config.
- Many settings disappeared at once.
- Existing active project tasks vanished from the normal sidebar despite healthy database/session state.
- Restarting did not restore them.
- Direct reads/navigation worked, and pinning forced the tasks to reappear.
Workaround used
- Created an offline backup of the complete Codex home state.
- Restored
config.tomlfrom a known-good backup and validated that the app could parse it. - Restarted Codex and verified the restored config was no longer truncated.
- Temporarily pinned the missing active tasks so they became visible.
- Unarchived one intentionally archived task only as part of user-requested recovery.
No direct edits were made to the conversation contents.
Related issues
This appears related to, but adds a distinct correlated config-rewrite timeline and a pinning-based visibility test beyond:
- #27178 — Windows config overwritten on restart
- #34076 — project registrations/sidebar catalog diverge from core database
- #29337 — Windows project/workspace chats missing from sidebar
- #17540 — local threads missing from sidebar/search while still present on disk
- #25463 — project threads disappear while JSONL remains readable
Questions for maintainers
- Can
config_processororlayer_ioserialize only the currently loaded layer and atomically replace the full user config? - Is there a supported ownership/merge contract for Desktop writes to
config.toml? - Which database/catalog is authoritative for Desktop project task visibility?
- Why does pinning a healthy but hidden task immediately make it visible?
- Can Desktop detect catalog drift and rebuild from
state_5.sqliteplus rollout files without requiring manual state edits? - What minimal redacted diagnostics would be most useful for a follow-up private feedback upload?
Sanitized timestamped log excerpts and file metadata can be provided privately on request. Raw configs, databases, and transcripts are intentionally withheld because they may contain sensitive information.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the named config_processor and layer_io log paths, then compare the complete and partial config states around the reported timeline. Next inspect state_5.sqlite, rollout files, project assignments, and sidebar behavior using the reproduction sequence; done means additive config changes preserve unrelated settings and healthy active assigned tasks remain visible after restart without pinning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, sqlite
- Domain
- databases, desktop
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100