Repository navigation
fix(proxies): move shared sessions.json to ~/.local/state/cli-proxies (#3067) - #3072
Merged
Merged
Conversation
…#3067) The commandcode + claude-code session map was anchored to PROXY_DIR (bin/sessions.json), so the #2782 workdir move to ~/.local/state/cli-proxies missed it and the tracked checkout kept dirtying with every session write, blocking pm-git-sync. - commandcode-proxy: add COMMANDCODE_PROXY_SESSION_FILE override (mirrors claude-code pattern); default resolves to the shared state root sessions.json. - claude-code-proxy: SESSION_FILE default moves from PROXY_DIR to the same shared state-root path; env override kept. Both proxies share one map (mirrored key space) so both must resolve to the same file. - home/common: pin COMMANDCODE_PROXY_SESSION_FILE and CLAUDE_CODE_PROXY_SESSION_FILE to %h/.local/state/cli-proxies/sessions.json on both units, alongside the existing *_PROXY_WORKDIR pins. Codex audit: bin/codex-proxy.mjs already resolves sessions.json via sessionStateDir() = $XDG_STATE_HOME/codex-proxy or ~/.local/state/codex-proxy -- outside the checkout, no change needed. muse-proxy uses warm-sessions.json under WORKDIR (moved by #2782), untouched. No .gitignore entry for bin/sessions.json, by design: after this fix nothing may write there, and dirt in the primary checkout is the regression tripwire. Verified: node --check on both proxies; node --test bin/commandcode-proxy.test.mjs (1 pass) and bin/claude-code-proxy.test.mjs (5 pass); nix-instantiate --parse home/common/default.nix rc=0; default path expression resolves to /home/user/.local/state/cli-proxies/sessions.json.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 6 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
dezren39
added a commit
that referenced
this pull request
Oct 31, 2026
…in state dirs now (#3067) The file was the CLI proxies shared key->session map back when it was anchored to the scripts own directory. Since #3072 the commandcode and claude-code units pin their *_PROXY_SESSION_FILE to ~/.local/state/cli-proxies/sessions.json, codex-proxy keeps its map under ~/.local/state/codex-proxy, and the opencode-route and design-code proxies keep no session map at all. Verified live 2026-10-31 by process environment and source inspection: no running proxy reads or writes this path. Keeping it tracked only dirtied the primary checkout and blocked pm-git-sync. Deliberately not gitignored (Drews rule): a future regression writing here should show up as dirt, not be hidden.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completes the missed remainder of the #2782/#2784 proxy state-dir move. That move relocated the CLI proxies' WORKDIR state (bin/work/) to ~/.local/state/cli-proxies, but the commandcode + claude-code key->session map was anchored to the scripts' own directory -- bin/sessions.json -- so the primary checkout kept dirtying with every session write and pm-git-sync stayed blocked.
Changes
Codex audit
bin/codex-proxy.mjs already resolves sessions.json via sessionStateDir() = $XDG_STATE_HOME/codex-proxy, falling back to ~/.local/state/codex-proxy -- always outside the checkout. No change needed. muse-proxy uses warm-sessions.json under WORKDIR (moved by #2782) -- untouched.
Deliberately NOT done
Verified on the laptop
Closes the code side of #3067.
Need help on this PR? Tag
@codesmith-botwith what you need.