Skip to content

Respect CODEX_HOME for local storage#104

Merged
BigPizzaV3 merged 2 commits into
BigPizzaV3:mainfrom
cquxl:codex/respect-codex-home-db
May 15, 2026
Merged

Respect CODEX_HOME for local storage#104
BigPizzaV3 merged 2 commits into
BigPizzaV3:mainfrom
cquxl:codex/respect-codex-home-db

Conversation

@cquxl
Copy link
Copy Markdown

@cquxl cquxl commented May 15, 2026

Summary

  • Resolve the default Codex local database from CODEX_HOME when it is set
  • Keep the existing ~/.codex/state_5.sqlite fallback when CODEX_HOME is not configured
  • Add a CLI parser test for CODEX_HOME based profile storage

Why

Tools such as CodexSwitcher launch Codex with an isolated CODEX_HOME per account. Codex++ previously always used the default user ~/.codex/state_5.sqlite path, so sidebar delete actions could fail with "Thread not found in local storage" even though the thread existed in the active profile database.

Test

  • python -m pytest tests/test_launcher_cli.py::test_cli_default_db_path_uses_codex_home tests/test_launcher_cli.py::test_cli_launch_subcommand_keeps_helper_server_alive_after_injection -q

@cquxl
Copy link
Copy Markdown
Author

cquxl commented May 15, 2026

Updated with an additional fix for merged/projected sidebar rows: when the helper reports "Thread not found in local storage", the renderer now removes the stale projected thread id and workspace hint before removing the row from the sidebar. This handles orphaned rows left by history/profile merging without treating unrelated delete failures as success.

@BigPizzaV3 BigPizzaV3 merged commit 228619d into BigPizzaV3:main May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants