Skip to content

Desktop app fails to launch when VS Code extension app-server is running — file lock conflict #21782

Description

@Damon-Xu7890

Bug Report

Description

After updating the Codex desktop app (Microsoft Store, v26.506.2212.0), the desktop app fails to launch with the error "另一程序正在使用此文件" ("Another program is using this file") whenever the VS Code Codex extension is active.

Before this desktop update, both the desktop app and VS Code extension worked simultaneously without any conflict.

Root Cause

The VS Code extension (openai.chatgpt) starts a background codex.exe app-server --analytics-default-enabled process that holds locks on the shared SQLite database files in ~/.codex/:

  • state_5.sqlite
  • logs_2.sqlite
  • Corresponding -shm and -wal files

The updated desktop app appears to use stricter/exclusive file locking, causing it to detect the existing locks from the extension's app-server process and refuse to start.

The previous desktop version used shared locking and coexisted with the extension's app-server without issues.

Environment

  • OS: Windows 11 (10.0.26200)
  • Desktop Codex: v26.506.2212.0 (Microsoft Store)
  • VS Code Extension: openai.chatgpt v26.506.21252 (bundled codex binary: 0.129.0-alpha.15)
  • CLI: codex-cli 0.129.0

Steps to Reproduce

  1. Open VS Code with the Codex extension enabled (this starts the codex app-server background process)
  2. Try to launch the Codex desktop app
  3. Error dialog: "另一程序正在使用此文件"

Expected Behavior

Both the desktop app and the VS Code extension should be able to run simultaneously, as they did before the desktop update.

Workaround

Close VS Code (which stops the extension's app-server process), then launch the desktop Codex app.

Suggested Fix

  • Use shared/concurrent SQLite locking (WAL mode) to allow both processes to access the same database
  • OR provide a configuration option to use separate data directories
  • OR provide a setting to disable the app-server background process in the VS Code extension

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appapp-serverIssues involving app server protocol or interfacesbugSomething isn't workingextensionIssues related to the VS Code extensionwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions