You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
__COMPAT_LAYER=DetectorsAppHealth env var breaks Edge browser launch from Copilot shell #1227
The Copilot desktop app sets __COMPAT_LAYER=DetectorsAppHealth in its process environment. This Windows Application Compatibility shim is inherited by all child processes (including the agent shell). When Microsoft Edge is launched from the Copilot shell (via Puppeteer, Playwright, or direct spawn), Edge's msedge.exe launcher process exits immediately with code 0, breaking all browser automation.
Chrome/Chromium's bundled exe is NOT affected.
Min Repro
From the Copilot agent shell:
# This FAILS because __COMPAT_LAYER=DetectorsAppHealth is inherited
node -e "require('puppeteer-core').launch({executablePath:'C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe',headless:true}).then(b=>{console.log('OK');b.close()}).catch(e=>console.error('FAIL:',e.message.substring(0,200)))"# Output: FAIL: Failed to launch the browser process: Code: 0# This WORKS after clearing the env var$env:__COMPAT_LAYER=$null# Same command -> Output: OK
When Edge inherits this shim, its launcher process exits immediately (code 0, ~90ms) instead of staying alive. Child browser processes DO run (port is reachable), but the parent exit causes Puppeteer/Playwright to treat it as a launch failure.
Suggested Fix
Don't set __COMPAT_LAYER for the shell/child processes
Clear it before spawning the agent shell
Or document this as a known limitation
Impact
Any agent task that needs to launch Edge (e2e tests, Puppeteer scripts, Playwright tests) fails from the Copilot shell.
Verified fixed in GitHub Copilot app v1.0.11 (Copilot CLI v1.0.59).
Confirmed that __COMPAT_LAYER is no longer set in the Copilot shell environment. Ran the DevTools MCP e2e test suite with Edge (PUPPETEER_EXECUTABLE_PATH=msedge.exe) and all 18 console tests pass without any workaround needed.
Activity
zoherghadyali commentedon Jun 29, 2026
Verified fixed in GitHub Copilot app v1.0.11 (Copilot CLI v1.0.59).
Confirmed that
__COMPAT_LAYERis no longer set in the Copilot shell environment. Ran the DevTools MCP e2e test suite with Edge (PUPPETEER_EXECUTABLE_PATH=msedge.exe) and all 18 console tests pass without any workaround needed.Thanks Pierce for the quick fix!