Repository navigation
unsloth start: hard-link only auth.json into the Codex parent overlay (follow-up to #14591) - #14635
Conversation
#14591 hard-linked every file of the user's Codex home into the --as-subagent overlay when symlinks are denied (Windows without Developer Mode), to share a rotated auth.json refresh token. That also linked Codex's WAL-mode SQLite dbs (state_5.sqlite and friends) under a second name, which SQLite documents as a corruption path: each name gets its own -wal and -shm. Keep the hard link for auth.json only and copy everything else, as before #14591.
|
@codex review |
1 similar comment
|
@codex review |
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. |
|
@codex security review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Follow-up to #14591.
What broke
#14591 fixed a real Codex login problem under
unsloth start codex --as-subagenton Windows: where symlinks are denied (no Developer Mode, no admin), the overlay copiedauth.json, so a token refresh in the overlay left the user's real~/.codex/auth.jsonwith a refresh token that had already been used. The fix replaced the copy with a hard link.The hard link was applied to every file in the user's Codex home, not only
auth.json. Codex keeps its WAL-mode SQLite databases inCODEX_HOME(state_5.sqlite,queue_1.sqlite,thread_history_1.sqlite, the logs db, plus any-wal/-shmsidecars;sqlite_homedefaults tocodex_homeincodex-rs/core/src/config/mod.rs). Hard-linking those gives the live database a second name. SQLite derives the-waland-shmpaths from the name it was opened under, so the overlay Codex and a plaincodex(or the Codex app) running at the same time use different WAL and shared-memory files for one database. SQLite documents this as a corruption path: How To Corrupt An SQLite Database File, 2.6 Multiple links to the same file. Before #14591 those files were copied into the overlay, so the user's real databases were never touched.What changed
write_codex_parent_overlayhard-links onlyauth.jsonwhen symlinks are denied. Every other file is copied, as before unsloth start: fix Studio discovery, proxy, Hermes context, Claude hooks and Codex login #14591. Symlinks, junctions and the first-login danglingauth.jsonlink are unchanged.state_5.sqlite, its-walandhistory.jsonlland in the overlay as copies (not the same inode), while the existing test still shows a rotatedauth.jsonrefresh token reaching the user's home. The new test fails on currentmainand passes with this change.The rest of #14591 was audited and left as is: discovery, loopback proxy bypass, task-tagged model filtering, Hermes provider rename and
threshold_tokens, Claude exec-form hooks (argslanded in Claude Code 2.1.139),apiKeyHelperblanking, merged--settings, the dsh profile shorthand, JSONC splicing and the Pi Node warning (legacy-node20tag confirmed on npm).Verification
unsloth_clisuites for start, start_app, the Claude plan gate, inference_chat, mcp, and the Codex and Claude subagent bridges: 1206 passed, 2 skipped.ruff checkand the repo's ruff format on the changed files.Not tested here