Bug: Copilot Agent Mode tool execution blocked by policy hook regression in Stable (Works in Insiders)
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
### VS Code Version
- **Stable Version:** 1.137.0 (Affected)
- **Insiders Version:** 1.138.0-insider Working as expected (Fix validated)
### Description of the Bug
A critical regression in the Stable channel's execution framework for **GitHub Copilot Agent Mode** causes custom tool calls / agent hooks to fail instantly. When attempting to trigger attribution hooks managed via `git-ai` and `Runlayer`, the action is blocked by a policy evaluation hook error.
The exact setup behaves flawlessly on **VS Code Insiders**, confirming that the patch or architectural refinement is already present on the development branch but missing from Stable.
### Error Logs
#### Trigger Exception
```json
Policy hook failed {"warningType":"policy_blocked"}
```
#### Complete Startup and Runtime Logs
Click to expand full Trace logs (from startup to failure execution)
```text
[info] [auth] Initializing GitHub Copilot session...
[info] [auth] Workspace policy profile resolved successfully.
[trace] [agent-mode] Registering tools from Model Context Protocol (MCP) gateways...
[trace] [mcp] Runlayer-managed MCP plugin initialized at endpoint.
[trace] [git-ai] git-ai 1.6.21 attribution/hooks loaded locally.
[trace] [hooks] Global sessionStart hook evaluated successfully.
[info] [agent-mode] Agent environment entering active listening state.
...
[trace] [agent-mode] Requesting execution permission for custom attribution tool call...
[error] [hooks] Policy evaluation rejected outbound capability request.
[error] [agent-mode] Policy hook failed {"warningType":"policy_blocked"}
```
### Affected Setup & Environment
- **Tooling Stack:** `git-ai` version `1.6.21` (attribution/hooks)
- **MCP Provider:** Runlayer-managed MCP plugin
- **OS Platform:**
### Steps to Reproduce
1. Configure an environment to use a `Runlayer`-managed MCP setup alongside `git-ai 1.6.21` attribution/hooks.
2. Initialize GitHub Copilot in **Agent Mode**.
3. Trigger a workflow that calls an external tool or executes an action bound to a repository/agent policy hook.
4. **Result on Stable:** Prompt immediately terminates with a `{"warningType":"policy_blocked"}` exception.
5. **Result on Insiders:** The policy hooks validate successfully and execute seamlessly.
### Additional Context & Request
Because this blocks core operational workflows for enterprise environments using strict attribution controls and Model Context Protocol (MCP) policy gateways, we kindly request the team to investigate which commit resolved this behavior in the Insiders branch and evaluate it for a **stable recovery release (hotfix/backport)**, or expedite the stabilization of the current Insiders branch into the next Stable milestone.
Contributor guide
Assessment
This issue has not been assessed yet.