codex-plugin-cc icon indicating copy to clipboard operation
codex-plugin-cc copied to clipboard

Report missing Claude projects directory

Open Kevinjohn opened this issue 4 months ago • 0 comments

Transfer reports a valid session file as missing when the Claude projects directory itself does not exist.

Observable sequence

  • Provide /codex:transfer with an existing JSONL source file.
  • Run it with a home directory that has no .claude/projects directory.
  • Expected: report that the Claude projects directory is missing.
  • Actual: report Claude session file not found for 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

Focused transfer regression showing the misleading source-file error before the fix

After — identical reproduction reports the correct condition

Focused transfer regression passing after the projects-directory error is distinguished

Kevinjohn avatar Jul 19 '26 22:07 Kevinjohn