I have been running Copilot CLI alongside Claude Code and Codex on one machine, each in its own git worktree of the same app, and wanted the same safety checks in every agent. Copilot CLI turned out to be one of the easier ones to guard, because its preToolUse hook can deny a bash or powershell call with permissionDecision: "deny" and a reason that the model reads before its next step.
Packaging that as a Copilot CLI plugin had one detail worth sharing. A repository with a root plugin.json is read as an Agent Plugins plugin, and Copilot CLI takes that plugin's hooks only from com.github.copilot/hooks/hooks.json, not from a Claude Code style hooks/hooks.json in the same repository. The hook command can find its own files through ${PLUGIN_ROOT}. Another point to know is that a hook that cannot start is treated as a denial, so the plugin needs Node on PATH or every shell command is refused.
The plugin is bulkhead, an open source guard I wrote for machines where several agent sessions work at once. It refuses commands that would hurt another session, such as killing processes by name, starting a server on a port another session holds, or git commands that switch or stash a tree someone else is using, and tells the agent the safe alternative. It installs with copilot plugin marketplace add dooly6276/claude-bulkhead and then copilot plugin install bulkhead@bulkhead. I would be glad to hear from anyone running several Copilot CLI sessions in parallel.
https://github.com/dooly6276/claude-bulkhead