Skip to content

Report missing Claude projects directory#534

Open
Kevinjohn wants to merge 1 commit into
openai:mainfrom
Kevinjohn:fix/transfer-projects-dir-error
Open

Report missing Claude projects directory#534
Kevinjohn wants to merge 1 commit into
openai:mainfrom
Kevinjohn:fix/transfer-projects-dir-error

Conversation

@Kevinjohn

Copy link
Copy Markdown

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
Kevinjohn marked this pull request as ready for review July 19, 2026 23:03
@Kevinjohn
Kevinjohn requested a review from a team July 19, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant