MCP tools now have context-aware permissions: - In headless mode: automatically allowed (no user to ask) - In TUI mode: require user confirmation (ask permission) Previously, MCP tools fell under the wildcard '*' policy which defaults to 'ask' permission. In headless mode, tools with 'ask' permission are filtered out to prevent the AI from seeing tools it cannot call. This caused MCP tools to be unavailable in headless mode unless explicitly allowed via command-line flags or agent file configuration. Implementation: - Added generateHeadlessPolicies() method to ToolPermissionService - Headless policies inject 'mcp__*' allow policy before other policies - Default policies keep MCP tools as 'ask' (appropriate for TUI mode) - Headless policy only applies when isHeadless flag is true Benefits: - ✅ MCP tools work in headless mode without explicit --allow flags - ✅ MCP tools still require confirmation in TUI mode for safety - ✅ Consistent with agent file behavior - ✅ Maintains security for other unmatched tools Changes: - Added generateHeadlessPolicies() in ToolPermissionService - Updated initializeSync to include headless policies - Added comprehensive tests for headless mode behavior - Updated documentation to reflect context-aware permissions Co-authored-by: dallin <dallin@continue.dev> Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev> |
||
|---|---|---|
| .. | ||
| cli | ||
| intellij | ||
| vscode | ||