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
Copilot harness does not respect existing hooks #342664
Start a new chat conversation using the Copilot harness.
Expected
The text "SessionStart invoked" is written to $env:TEMP\hook-discovery.log
Actual
The hook does not run and nothing is written to the file.
Further Notes
If you replace "windows" with "powershell" in the test.json file and start a new chat, the text is written to the file. This indicates the "Copilot" harness is only using Copilot-style hooks.
Tested with the exact SDK and runtime extracted from the official VS Code 1.145.0 macOS arm64 download (commit a717861c07586a53d83b80d742cd3f59b20a6273):
SDK: 1.0.27-unstable.41379698026.g3219c66
Runtime: 1.0.103-unstable.r41379698026.g3219c66
In isolated SDK sessions, SessionStart hooks in .github/hooks/test.json successfully executed using osx, bash, or command. An osx override also took precedence over command. These checks verified the files written by the commands and successful hook execution events, not just discovery. Hooks ran when the first message was sent. This was a direct bundled-SDK test, not an end-to-end workbench test.
One remaining compatibility difference: the runtime rejects comments and trailing commas, while the VS Code hook loader accepts JSONC. The example above contains a trailing comma after the command value; that must be removed for the current runtime to load the file. Both rejection cases were reproduced with the stable runtime.
The macOS equivalent of the command-field problem therefore no longer reproduces in the latest stable bundled runtime. Windows-specific windows execution has not been verified. Please retest on VS Code 1.145.0 on Windows, removing the trailing comma and sending the first message in a new conversation, to confirm whether the original Windows symptom remains.
Retested on Windows x64 with the exact SDK and runtime extracted from the official latest stable VS Code 1.145.0 archive (commit a717861c07586a53d83b80d742cd3f59b20a6273). The archive's SHA-256 matched the official download metadata.
SDK: 1.0.27-unstable.41379698026.g3219c66
Runtime: 1.0.103-unstable.r41379698026.g3219c66
In isolated SDK sessions using a local mock model endpoint:
Test
Result
SessionStart with windows
Executed successfully
SessionStart with powershell
Executed successfully
SessionStart with command
Executed successfully
windows override alongside command
Windows override executed
Trailing comma in the hook file
Rejected as invalid JSON; no hook execution
JSON comment in the hook file
Rejected as invalid JSON; no hook execution
Successful execution was verified through both files written by the commands and successful hook.end events. Hooks ran when the first message was sent, not when the session was created.
The original Windows command-field symptom therefore no longer reproduces in this stable bundled runtime with valid JSON. The issue's example contains a trailing comma after the command value; removing it is necessary for this runtime to load the file. JSONC compatibility remains a difference from the VS Code hook loader, which accepts comments and trailing commas.
These were direct tests of the stable bundled SDK/runtime, not an end-to-end workbench UI test.
Activity
aeschli commentedon Nov 5, 2026
Tested with the exact SDK and runtime extracted from the official VS Code 1.145.0 macOS arm64 download (commit
a717861c07586a53d83b80d742cd3f59b20a6273):1.0.27-unstable.41379698026.g3219c661.0.103-unstable.r41379698026.g3219c66In isolated SDK sessions,
SessionStarthooks in.github/hooks/test.jsonsuccessfully executed usingosx,bash, orcommand. Anosxoverride also took precedence overcommand. These checks verified the files written by the commands and successful hook execution events, not just discovery. Hooks ran when the first message was sent. This was a direct bundled-SDK test, not an end-to-end workbench test.One remaining compatibility difference: the runtime rejects comments and trailing commas, while the VS Code hook loader accepts JSONC. The example above contains a trailing comma after the command value; that must be removed for the current runtime to load the file. Both rejection cases were reproduced with the stable runtime.
The macOS equivalent of the command-field problem therefore no longer reproduces in the latest stable bundled runtime. Windows-specific
windowsexecution has not been verified. Please retest on VS Code 1.145.0 on Windows, removing the trailing comma and sending the first message in a new conversation, to confirm whether the original Windows symptom remains.aeschli commentedon Nov 5, 2026
Retested on Windows x64 with the exact SDK and runtime extracted from the official latest stable VS Code 1.145.0 archive (commit
a717861c07586a53d83b80d742cd3f59b20a6273). The archive's SHA-256 matched the official download metadata.1.0.27-unstable.41379698026.g3219c661.0.103-unstable.r41379698026.g3219c66In isolated SDK sessions using a local mock model endpoint:
SessionStartwithwindowsSessionStartwithpowershellSessionStartwithcommandwindowsoverride alongsidecommandSuccessful execution was verified through both files written by the commands and successful
hook.endevents. Hooks ran when the first message was sent, not when the session was created.The original Windows command-field symptom therefore no longer reproduces in this stable bundled runtime with valid JSON. The issue's example contains a trailing comma after the command value; removing it is necessary for this runtime to load the file. JSONC compatibility remains a difference from the VS Code hook loader, which accepts comments and trailing commas.
These were direct tests of the stable bundled SDK/runtime, not an end-to-end workbench UI test.