Skip to content

fix(vscode): keep legacy Copilot hooks active in WSL/SSH/remote contexts#1189

Open
jorgegarciarey wants to merge 1 commit into
git-ai-project:mainfrom
jorgegarciarey:fix/wsl-remote-legacy-hooks
Open

fix(vscode): keep legacy Copilot hooks active in WSL/SSH/remote contexts#1189
jorgegarciarey wants to merge 1 commit into
git-ai-project:mainfrom
jorgegarciarey:fix/wsl-remote-legacy-hooks

Conversation

@jorgegarciarey
Copy link
Copy Markdown

@jorgegarciarey jorgegarciarey commented Apr 24, 2026

Fixes #1188

In remote contexts (WSL, SSH, Codespaces, dev containers), native Copilot
hooks fire on the Local Extension Host where Copilot runs, but git-ai runs
on the Remote Extension Host. VS Code's Remote protocol does not relay
these hooks across hosts, so we must keep legacy hooks active.

- Add optional `remoteName` param to `shouldSkipLegacyCopilotHooks()`
- Pass `vscode.env.remoteName` from AIEditManager constructor
- Add tests for WSL, SSH, dev-container, and codespaces contexts

Fixes git-ai-project#1187
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 24, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@svarlamov
Copy link
Copy Markdown
Member

Thank you for your first contribution @jorgegarciarey -- excited for more!!

Quick question, how has this update been working for you on remove envs/devcontainers? I need to dig deeper, but two things come to mind:

a) Shocked that the copilot hooks would run locally (🤯). Is this documented or are they looking at fixing this? Any way we could configure our hooks to run on the remote?
b) We had open issues re remote containers using the legacy approach too #237

Ideally, we could figure out a fix that doesn't require using the legacy/extension model, but open to it if that's our only option.

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.

[Bug]: VS Code extension disables legacy Copilot hooks in WSL Remote, causing no AI attribution

3 participants