Skip to content

Fix Claude resume cwd for project paths with spaces#5

Merged
aytzey merged 1 commit into
mainfrom
fix/claude-space-cwd-resume
Jul 9, 2026
Merged

Fix Claude resume cwd for project paths with spaces#5
aytzey merged 1 commit into
mainfrom
fix/claude-space-cwd-resume

Conversation

@aytzey

@aytzey aytzey commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • prefer the first observed real Claude cwd before falling back to the lossy project-dir slug reconstruction
  • keep project-bucket cwd behavior for sessions that continue in nested folders
  • add a regression test for Claude project slugs that collapse spaces into hyphens

Tests

  • docker run --rm -v "/home/aytzey/Documents/showagent":/src -w /src golang:1.25.9 sh -lc 'export PATH=/usr/local/go/bin:/home/aytzey/.nvm/versions/node/v24.11.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-path:/home/aytzey/.codex/tmp/arg0/codex-arg0K2GQG2:/home/aytzey/.bun/bin:/home/aytzey/.deno/bin:/home/aytzey/.nvm/versions/node/v24.11.0/bin:/home/aytzey/.cargo/bin:/home/aytzey/.local/bin:/home/aytzey/.local/kitty.app/bin:/home/aytzey/.bun/bin:/home/aytzey/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin; go test ./internal/session -run "TestClaudeResumeUsesProjectBucketCWD|TestClaudeResumeUsesObservedCWDWhenProjectSlugIsLossy" && go test ./...'
  • docker run --rm -v "/home/aytzey/Documents/showagent":/src -w /src golang:1.25.9 sh -lc 'export PATH=/usr/local/go/bin:/home/aytzey/.nvm/versions/node/v24.11.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-path:/home/aytzey/.codex/tmp/arg0/codex-arg0K2GQG2:/home/aytzey/.bun/bin:/home/aytzey/.deno/bin:/home/aytzey/.nvm/versions/node/v24.11.0/bin:/home/aytzey/.cargo/bin:/home/aytzey/.local/bin:/home/aytzey/.local/kitty.app/bin:/home/aytzey/.bun/bin:/home/aytzey/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin; go test -race ./...'

Verified locally with the real Claude session c4c6e5a8-2a14-4b35-b122-797ac56177a6: showagent info now resolves cwd to /home/aytzey/Documents/fable is arama.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@aytzey, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 42 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 84ea36a9-a9c8-461d-838f-bf649dfad61f

📥 Commits

Reviewing files that changed from the base of the PR and between 5cf5b10 and 9bd81f3.

📒 Files selected for processing (2)
  • internal/session/claude.go
  • internal/session/session_test.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/claude-space-cwd-resume

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@aytzey aytzey merged commit 34913db into main Jul 9, 2026
6 checks passed
@aytzey aytzey deleted the fix/claude-space-cwd-resume branch July 9, 2026 12:10
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