Repository navigation
Open
Labels
area:non-interactiveNon-interactive mode (-p), CI/CD, ACP protocol, and headless automationNon-interactive mode (-p), CI/CD, ACP protocol, and headless automationarea:toolsBuilt-in tools: file editing, shell, search, LSP, git, and tool call behaviorBuilt-in tools: file editing, shell, search, LSP, git, and tool call behavior
Description
Describe the bug
--available-tools is documented to disable every tool not listed, but an empty value (--available-tools= or --available-tools '') sends all 21 built-in tools, the same as omitting the flag. There's no documented way to run copilot -p with no tools.
| Flag | Tools sent to the model |
|---|---|
--available-tools= |
21 |
--available-tools '' |
21 |
--excluded-tools '*' |
21 |
--available-tools __none__ (a name that matches no tool) |
0 |
The workaround in the last row works, but it relies on unknown tool names being silently ignored.
Affected version
GitHub Copilot CLI 1.0.105
Steps to reproduce the behavior
- In an empty directory, run:
copilot -p "Reply with the word ok." -s --model claude-haiku-5.5 \ --available-tools= --disable-builtin-mcps --no-custom-instructions --no-ask-user - Read the tool count from the newest session's events:
Output:
EVENTS=$(ls -t ~/.copilot/session-state/*/events.jsonl | head -1) jq -rn 'first(inputs | select(.type == "session.usage_checkpoint")) | .data.promptCacheBreakState[0].models[] | "\(.model): tool_count=\(.tool_count) tool_tokens=\(.tool_tokens)"' "$EVENTS"claude-haiku-5.5: tool_count=21 tool_tokens=10439 - Repeat steps 1 and 2 with
--available-tools __none__.Output:copilot -p "Reply with the word ok." -s --model claude-haiku-5.5 \ --available-tools='__none__' --disable-builtin-mcps --no-custom-instructions --no-ask-userclaude-haiku-5.5: tool_count=0 tool_tokens=0
Expected behavior
An empty --available-tools exposes no tools, or there's a documented way to disable all tools and an empty value is rejected with an error.
Additional context
For text-only copilot -p calls in CI, the unwanted tool definitions add about 10,000 tokens per call. Related: #4596 (system prompt still references removed tools), #407 (list available tools).
Metadata
Metadata
Assignees
Labels
area:non-interactiveNon-interactive mode (-p), CI/CD, ACP protocol, and headless automationNon-interactive mode (-p), CI/CD, ACP protocol, and headless automationarea:toolsBuilt-in tools: file editing, shell, search, LSP, git, and tool call behaviorBuilt-in tools: file editing, shell, search, LSP, git, and tool call behavior
Activity