Repository navigation
fix: treat an empty CLAUDE_CONFIG_DIR or CODEX_HOME as unset - #48
Merged
VikramLex merged 1 commit intoNov 27, 2026
Merged
Conversation
sessions import (without --path) looked in the relative folder projects or sessions, and setup/connect wrote Codex's hooks.json into the current folder, when the variable was set but empty. agent_detect and terminal::codex_home already ignore empty values; the session-import roots and the Codex hooks file now do the same. Signed-off-by: Lenin Mookiah <2639584+leninworld@users.noreply.github.com>
Member
|
Merged, thank you. An empty |
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.
Summary
CLAUDE_CONFIG_DIRorCODEX_HOMEwas used as a folder instead of being treated as unset in two places:capture::default_root: withCLAUDE_CONFIG_DIR=(orCODEX_HOME=),graphicle sessions import --client claude-code(or--client codex) without--pathlooked in the relative folderprojects(orsessions) and failed withgraphicle: Transcript path not found, instead of reading~/.claude/projects(or~/.codex/sessions).agent_setup::hook_file: withCODEX_HOME=,setup --clients codexandconnect codex --hookswrote Codex's hooks file to the relativehooks.jsonin the current folder, while the same command putconfig.tomlin~/.codex(that path comes fromagent_detect::Environment::current, which already ignores empty values).agent_detect::Environment::currentandterminal::codex_home; the three remaining reads now use the same filter. A non-empty value is still used as given.crates/graphicle-graph/src/install.rsalso readsCLAUDE_CONFIG_DIRwithout the filter; I left it alone because it is part of the Graphify port.Test plan
capture::sessions_cli_empty_client_home_uses_the_default_folderrunssessions importfor claude-code and codex from an empty folder, with a fixture home and the variable set to"". Onmainit fails withgraphicle: Transcript path not found; with this change each client imports its one transcript from the default folder. Removing only theCODEX_HOMEfilter makes the codex case fail too.easy_review::setup_codex_empty_home_writes_hooks_under_the_default_homerunssetup --yes --clients codexwithCODEX_HOME="". Onmain,~/.codex/hooks.jsonis not written; with this change it holds Graphicle's Stop hook and nohooks.jsonlands in the repository folder.cargo fmt --check,cargo clippy --locked --all-targets -- -D warnings,cargo clippy --locked --all-targets --features local-inference -- -D warningsandcargo test --locked --all-targetsincrates/graphicle(Rust 1.95.0, macOS). Linux and Windows run in CI.cargo deny check bans licenses sourcesincrates/graphicle(as in CI): ok. The fullcargo deny checkalso reports the advisory RUSTSEC-2026-0543 (chrono unmaintained) from theCargo.lockonmain; this change does not touchCargo.tomlorCargo.lock.