Skip to content

Fix Claude Code session resume with correct project path#43

Merged
gricha merged 1 commit intomainfrom
fix/session-resume-projectpath
Jan 8, 2026
Merged

Fix Claude Code session resume with correct project path#43
gricha merged 1 commit intomainfrom
fix/session-resume-projectpath

Conversation

@gricha
Copy link
Copy Markdown
Owner

@gricha gricha commented Jan 8, 2026

Summary

  • Fix Claude Code session resume failing with "No conversation found with session ID" when resuming sessions created via interactive CLI
  • Thread projectPath from session listing through web/mobile UI to chat handler
  • Pass projectPath as working directory when spawning Claude Code process
  • Add Playwright test to verify projectPath is sent in WebSocket messages
  • Document OpenCode session resume bug in TODO.md for later fix

Root Cause

When resuming a session, Perry was running Claude with cwd=homedir() instead of the original project directory. Claude uses the working directory to determine which project folder to search for sessions (stored in ~/.claude/projects/<project-name-dashed>/<sessionId>.jsonl).

Test plan

  • New Playwright test verifies projectPath is sent in WebSocket message when resuming session
  • All 108 integration tests pass
  • All 21 web UI tests pass

🤖 Generated with Claude Code

When resuming a Claude Code session created via interactive CLI, the web
UI would fail with "No conversation found with session ID" because Perry
was running Claude with cwd=homedir() instead of the original project
directory.

Claude uses the working directory to determine which project folder to
search for sessions. Sessions are stored in:
~/.claude/projects/<project-name-dashed>/<sessionId>.jsonl

This change threads the projectPath from session listing through to the
chat handler, passing it as the working directory when spawning Claude.

Also documents the separate OpenCode session resume bug in TODO.md for
later fix.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gricha gricha merged commit 19105b2 into main Jan 8, 2026
7 checks passed
@gricha gricha deleted the fix/session-resume-projectpath branch January 8, 2026 03:31
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