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
The daemon passes CODEX_HOME to headless Codex children, but its persisted thread catalog and turn-patch storage still derive paths from $HOME/.codex. The generated systemd and launchd service definitions also omit an explicitly selected CODEX_HOME.
目标
Use one resolved Codex home across headless children, persisted thread discovery, turn-patch storage, and managed service restarts while preserving the existing $HOME/.codex fallback.
完成标准
A valid non-empty CODEX_HOME resolves the default SQLite catalog to $CODEX_HOME/state_5.sqlite.
Turn-patch session and state paths derive from the same resolved Codex home ($CODEX_HOME/sessions and $CODEX_HOME/codex-remote-feishu/current-thread-patches).
An unset CODEX_HOME preserves the current $HOME/.codex behavior.
Generated systemd and launchd service definitions preserve the selected CODEX_HOME.
Focused regression tests cover custom and default resolution plus managed-service rendering.
User-facing installation documentation explains the supported non-default CODEX_HOME behavior.
建议范围
internal/codexstate:统一默认 Codex Home、SQLite catalog、sessions 与 turn-patch state 的路径解析。
Review upstream draft PR kxn#905 for commit efe31edc; do not mark it ready or merge it without explicit authorization.
下一步
Inspect upstream draft PR kxn#905 checks and review feedback. Mark ready or merge only after explicit authorization for that PR.
最后一致状态
Commit efe31edc implements the shared resolution and persisted install-state contract. Focused tests, go test ./... -count=1, and scripts/check/pre-commit.sh passed. The branch was published through safe-push.sh, fork draft PR #2 and upstream draft PR kxn#905 are open, and a local install verified that install state and the daemon process preserve the selected CODEX_HOME.
未完成尾项
Add regression tests.
Implement shared Codex home resolution.
Wire persisted catalog and turn-patch storage.
Preserve CODEX_HOME in systemd and launchd definitions.
Update user documentation.
Run repository verification and open a draft pull request.
背景
Track the implementation of kxn/codex-remote-feishu#904 in this fork.
The daemon passes
CODEX_HOMEto headless Codex children, but its persisted thread catalog and turn-patch storage still derive paths from$HOME/.codex. The generated systemd and launchd service definitions also omit an explicitly selectedCODEX_HOME.目标
Use one resolved Codex home across headless children, persisted thread discovery, turn-patch storage, and managed service restarts while preserving the existing
$HOME/.codexfallback.完成标准
CODEX_HOMEresolves the default SQLite catalog to$CODEX_HOME/state_5.sqlite.$CODEX_HOME/sessionsand$CODEX_HOME/codex-remote-feishu/current-thread-patches).CODEX_HOMEpreserves the current$HOME/.codexbehavior.CODEX_HOME.CODEX_HOMEbehavior.建议范围
internal/codexstate:统一默认 Codex Home、SQLite catalog、sessions 与 turn-patch state 的路径解析。internal/app/daemon:让生产构造调用复用同一个已解析 Codex Home。internal/app/install:在 systemd 与 launchd 定义中保留显式CODEX_HOME。docs/general/user-guide.md:说明非默认CODEX_HOME的安装与自动启动行为。实现参考
internal/config/codex_model_provider_env.go已有的CODEX_HOME目录校验语义。internal/codexstate的单一 helper,供 SQLite catalog 与 turn-patch storage 共用。CODEX_HOME,不改变未设置时的默认环境。检查参考
go test ./internal/codexstatego test ./internal/app/daemongo test ./internal/app/installscripts/check/pre-commit.sh收尾参考
git创建英文 conventional commit。./safe-push.sh推送任务分支。Closes #1、验证记录和文档影响的 draft PR。执行决策
CODEX_HOME路径合同,拆开会形成中间不一致状态。当前执行单元
Review upstream draft PR kxn#905 for commit
efe31edc; do not mark it ready or merge it without explicit authorization.下一步
Inspect upstream draft PR kxn#905 checks and review feedback. Mark ready or merge only after explicit authorization for that PR.
最后一致状态
Commit
efe31edcimplements the shared resolution and persisted install-state contract. Focused tests,go test ./... -count=1, andscripts/check/pre-commit.shpassed. The branch was published throughsafe-push.sh, fork draft PR #2 and upstream draft PR kxn#905 are open, and a local install verified that install state and the daemon process preserve the selectedCODEX_HOME.未完成尾项
CODEX_HOMEin systemd and launchd definitions.执行快照
efe31edc和 CI,再按用户明确授权继续。