codex-plugin-cc
codex-plugin-cc copied to clipboard
Report missing Claude projects directory
Transfer reports a valid session file as missing when the Claude projects directory itself does not exist.
Observable sequence
- Provide
/codex:transferwith an existing JSONL source file. - Run it with a home directory that has no
.claude/projectsdirectory. - Expected: report that the Claude projects directory is missing.
- Actual: report
Claude session file not foundfor the existing source.
Root cause and fix
One try/catch wrapped both realpathSync calls, so either failure was attributed to the source file. Resolve the source and projects directory separately and report the failing path accurately.
A regression test constructs an existing source with a missing projects directory and checks both the positive and negative error assertions.
Validation
- Focused regression: 1 passed
- Full suite: 92 passed
git diff --check: clean
Actual screenshots
Before — existing source incorrectly reported missing
After — identical reproduction reports the correct condition