Local fork of continuedev/continue for auto-approve and full-access mode experiments
Find a file
RomneyDa 913d00bed4 Allow MCP tools in headless mode, ask in TUI mode
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>
2026-01-14 23:13:47 +00:00
.continue fix: 🔥 Additional fixes based on commnets 2025-11-18 19:45:34 -08:00
.github Merge pull request #9497 from ThanhNguyxn/fix/add-gh-token-to-agents-workflow 2026-01-14 14:23:55 -08:00
.husky feat: .continue/environment.json (#7983) 2025-09-25 16:30:56 -07:00
.idea fix: migrate to built-in inline completion API from 2024.1 (#6947) 2025-08-20 09:54:40 -07:00
.vscode vercel ai sdk, feature-flagged by env var 2025-12-10 00:46:22 +00:00
actions fix: allow external repos to grab review scripts from continue repo 2025-10-22 15:26:13 -07:00
binary chore(deps): bump undici from 7.16.0 to 7.18.2 in /binary 2026-01-14 21:22:31 +00:00
core Merge pull request #9325 from shanevcantwell/fix/wsl2-terminal-command-uri 2026-01-14 13:26:24 -08:00
docs docs: cloud agent guides (#9495) 2026-01-13 16:10:43 -08:00
eval Preview (#1750) 2024-07-28 23:16:18 -07:00
extensions Allow MCP tools in headless mode, ask in TUI mode 2026-01-14 23:13:47 +00:00
gui Security updates: upgrade @modelcontextprotocol/sdk and @reduxjs/toolkit (#9498) 2026-01-13 16:42:24 -08:00
manual-testing-sandbox chore(deps): bump django from 4.2.22 to 4.2.27 in /manual-testing-sandbox (#8992) 2025-12-03 09:49:19 -08:00
media delete old gifs 2025-08-06 16:53:57 -07:00
packages chore: continue package bumps (#9532) 2026-01-14 11:31:41 -08:00
scripts Add script to analyze file hotspots from git history (#8591) 2025-11-04 11:55:36 -08:00
sync merkel 2024-10-23 10:29:15 +02:00
.continueignore ignore .continue folder 2025-03-08 16:18:51 -08:00
.eslintrc.shared.json add no misused promises rule 2025-06-13 22:09:32 +05:30
.gitignore Add worktree copy configuration and ignore copy status files 2025-12-10 20:01:59 -08:00
.node-version Update Node.js LTS to v20.19.0 2025-04-22 02:01:03 +08:00
.nvmrc Update Node.js LTS to v20.19.0 2025-04-22 02:01:03 +08:00
.prettierignore feat: husky for prettier (#7979) 2025-09-25 16:13:08 -07:00
.prettierrc remove border above input box 2024-11-05 08:18:31 -08:00
CLA.md fix: Return the CLA (#6585) 2025-07-16 02:01:42 -07:00
CODE_OF_CONDUCT.md npx prettier --check "**/*.{js,jsx,ts,tsx,json,css,md}" --ignore-path . 2025-05-25 18:41:32 -07:00
CONTRIBUTING.md docs: update link (#7954) 2025-09-24 14:52:36 -07:00
LICENSE Create LICENSE 2023-06-03 09:29:19 +02:00
package-lock.json fix: Constrain root eslint to v8 to match core dependency 2025-12-05 17:15:29 -08:00
package.json fix: Constrain root eslint to v8 to match core dependency 2025-12-05 17:15:29 -08:00
README.md Merge pull request #8962 from continuedev/add-integration-docs 2025-12-15 13:53:28 -05:00
SECURITY.md Create SECURITY.md 2025-02-01 01:01:08 -08:00
tsconfig.json .continuerules 2024-12-15 09:30:56 -08:00
worktree-config.yaml Add worktree copy configuration and ignore copy status files 2025-12-10 20:01:59 -08:00

Continue logo

Continue

Ship faster with Continuous AI

The future of coding isn't writing more code. It's delegating the boring parts, so you can build the interesting stuff

Get started in Mission Control, CLI (Headless Mode), or CLI (TUI mode)

Quick Install

npm i -g @continuedev/cli
cn

Cloud Agents

Set workflows to run automatically on PR opens, schedules, or any event trigger

Cloud Agents

CLI Agents

Watch workflows execute in real-time and approve decisions step-by-step from your terminal

CLI Agents

IDE Agents

Trigger workflows from VS Code or JetBrains—let agents handle the refactoring while you keep coding

IDE Agents

Contributing

Read the contributing guide, and join #contribute on Discord.

License

Apache 2.0 © 2023-2024 Continue Dev, Inc.