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
sessionStart hook stops running after adding sandbox.userPolicy.filesystem paths #5098
Actual: The hook ran at session start, and its log showed it. After I added readonlyPaths ( /home//.copilot , /home//.nvm ) and readwritePaths ( …/.copilot/.cache/copilot/marketplaces , …/.copilot/installed-plugins , …/.copilot/plugin-data ) to sandbox.userPolicy.filesystem , it never runs again. /env still lists the hook. The hook's first statement in the command appends a line to $COPILOT_PLUGIN_DATA/hook-invoked.log , and that file is never created. No warning is shown, and the process logs contain no hook entries. Run by hand, the same command works.
Also unclear in the docs: The settings reference documents only filesystem.deniedPaths . It doesn't document readonlyPaths or readwritePaths , though the hooks docs say to grant hooks access via sandbox.userPolicy .
Affected version
GitHub Copilot CLI 1.0.94.
Steps to reproduce the behavior
Enable Sandbox
Configure and install a sessionStart-Hook
add readonly-Paths and readwrite-Paths (see above for which) to settings.json
restart session, exit and then check whether the hook wrote logs -> no log written
exit copilot
run the hook's command manually -> log written
Expected behavior
Expected: A plugin's hooks/hooks.json SessionStart command hook runs at every fresh start.
You don't need to add ~/.copilot and what not as readonly - everything that's outside CWD, and not explicitly allowed, is already read only by default.
That said, would need some logs (you can run /collect-debug-logs and send via email at my username github.com or post it in here.
Also note that the sessionStart hook only runs when you actually send a message.
FWIW, here's an example of what you should see if the hook tries to do something its sandbox policy wouldn't allow:
Activity
caarlos0 commentedon Oct 9, 2026
Hi!
You don't need to add
~/.copilotand what not as readonly - everything that's outside CWD, and not explicitly allowed, is already read only by default.That said, would need some logs (you can run
/collect-debug-logsand send via email at my username github.com or post it in here.Also note that the
sessionStarthook only runs when you actually send a message.FWIW, here's an example of what you should see if the hook tries to do something its sandbox policy wouldn't allow: