Bug
When the Copilot CLI (or Claude Code) changes its working directory internally via its cwd command, the diff panel fails with:
Error invoking remote method 'diff:resolveGitRoot': Error: No git repository found from: C:\Users
Works when you cd to the repo directory before starting the CLI.
Fails when the CLI changes directory after it's already running.
Root Cause
The diff panel reads terminal.cwd from the terminal store to resolve the git root. CWD tracking relies on OSC 7, OSC 9;9, and prompt regex — none of which fire when the CLI changes directory internally (it runs as a subprocess and doesn't emit escape sequences).
Fix
PR #112 — DiffReview.tsx's terminalCwd selector now checks the linked AI session's CWD first (via copilotSessions/claudeCodeSessions), falling back to shell CWD when no session is linked. This avoids overwriting terminal.cwd entirely (no two-writers problem, no WSL path corruption, no session restore poisoning).
Bug
When the Copilot CLI (or Claude Code) changes its working directory internally via its
cwdcommand, the diff panel fails with:Works when you
cdto the repo directory before starting the CLI.Fails when the CLI changes directory after it's already running.
Root Cause
The diff panel reads
terminal.cwdfrom the terminal store to resolve the git root. CWD tracking relies on OSC 7, OSC 9;9, and prompt regex — none of which fire when the CLI changes directory internally (it runs as a subprocess and doesn't emit escape sequences).Fix
PR #112 — DiffReview.tsx's
terminalCwdselector now checks the linked AI session's CWD first (viacopilotSessions/claudeCodeSessions), falling back to shell CWD when no session is linked. This avoids overwritingterminal.cwdentirely (no two-writers problem, no WSL path corruption, no session restore poisoning).