You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: CLI intercepts command names in text responses and attempts to execute them #774
Bug: CLI intercepts command names in text responses and attempts to execute them
Description
The GitHub Copilot CLI incorrectly intercepts command names (like kill, pkill) that appear in text responses and attempts to execute them as system commands. This breaks normal conversation context and makes it impossible to discuss certain system utilities.
Steps to Reproduce
Start a conversation about building OS utilities
Use the session command to record text containing words like "kill" or "pkill"
CLI intercepts these words and tries to execute them as commands
Get error: Command not executed. The 'kill' command must specify at least one numeric PID.
Example
When trying to record this text:
session me "Built chmod, grep, ps, and kill commands"
CLI output:
Command not executed. The 'kill' command must specify at least one numeric PID. Usage: kill <PID> or kill -9 <PID>
Expected Behavior
The CLI should distinguish between:
Talking ABOUT a command in text/conversation ("we should build the kill command")
Executing a command (actual tool invocation with bash tool)
Text passed to other tools (like session) should NOT be intercepted and interpreted as executable commands.
Actual Behavior
The CLI aggressively pattern-matches certain command names in ANY context and attempts to execute them, even when they're part of text arguments to other tools.
Impact
Breaks OS development conversations - Can't discuss process management utilities
Forces awkward workarounds - Have to rename commands (e.g., "termproc" instead of the k-word)
Context-unaware - No understanding of which tool is being called
Overly aggressive - Intercepts text that's clearly not a command invocation
Environment
GitHub Copilot CLI version: 0.0.369
OS: Linux (Ubuntu 24.04)
Use case: Building BarrerOS (C# operating system)
Suggested Fix
The command interception logic should:
Only apply to direct bash tool invocations
NOT intercept text arguments passed to other tools
Ignore command names that appear in quoted strings or tool parameters
Workaround
Currently using alternative command names to avoid interception (e.g., termproc instead of kill).
Related
This is particularly problematic for:
Operating system development
Systems programming discussions
DevOps/infrastructure work
Any conversation about process management
Note: This bug makes it impossible to have normal technical conversations about certain system utilities. The CLI should be context-aware enough to know when text is part of a conversation vs. an executable command.
I've run into something very similar/the same, when GHCP tries to rename a file whose name includes kill:
$ cd /home/asklar/actions-runner/_work/ai-social/ai-social && mv _posts/2026-01-19-tailwind-ai-agents-kill-monetization.md _posts/2026-01-19-tailwind-ai-agents-break-monetization.md
Command not executed. The 'kill'command must specify at least one numeric PID. Usage: kill<PID> or kill -9 <PID>
Activity
asklar commentedon Jan 9, 2026
I've run into something very similar/the same, when GHCP tries to rename a file whose name includes
kill:EvanBoyle commentedon Jan 22, 2026
This has been fixed!