Conversation
- Add session file validation to prevent crash on corrupted/old sessions - Add cross-platform command finder (uses 'where' on Windows, 'which' on Unix) - Refactor agent detection to use shared findCommandPath utility - Add defensive handling in getSessionSummary for missing trackerState Fixes crash: TypeError: undefined is not an object (evaluating 'state.trackerState.totalTasks') Fixes: Agent 'opencode' not available on Windows (which command not found)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThis pull request consolidates command path detection logic across agent plugins into a shared utility function with platform-appropriate tooling, and introduces structured validation for persisted sessions with defensive null-safety fallbacks for missing state. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
🧰 Additional context used📓 Path-based instructions (2)**/*.{js,ts,jsx,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.{js,ts,tsx,jsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧬 Code graph analysis (3)src/plugins/agents/builtin/claude.ts (2)
src/plugins/agents/builtin/opencode.ts (2)
src/session/persistence.ts (1)
🔇 Additional comments (7)
✏️ Tip: You can disable this entire section by setting 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. Comment |
fix: improve Windows/WSL compatibility
Summary
trackerStatewhere.exeinstead ofwhich)Changes
Session File Validation (
persistence.ts)validateLoadedSession()to check required fields before castingnullwith helpful warning instead of crashinggetSessionSummary()for extra safetyCross-Platform Command Finding (
base.ts)findCommandPath()utility that uses:whereon Windowswhichon Unix/Linux/macOSwherereturning multiple paths (takes first)Agent Plugin Updates (
claude.ts,opencode.ts)runWhich()implementationsfindCommandPath()utilityTest plan
Known Issues
WSL stdin bug: Users on WSL may still encounter
EPERM: operation not permitted, readeven on Bun 1.3.3+. This is tracked upstream at oven-sh/bun#24615. The issue was reportedly fixed in 1.3.3 but may have regressed - user reports hitting it on 1.3.6.Workarounds for WSL users:
bun upgrade --version 1.3.0(pre-regression)Summary by CodeRabbit
Release Notes
Bug Fixes
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.