-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed as not planned
Closed as not planned
Copy link
Description
Behavior
When using --config-dir to point to a directory containing agent files, the CLI finds the agent (no "No such agent" error) but silently ignores the agent's instructions. The agent's system prompt is not applied.
Steps to reproduce
# 1. Create agent in a custom config dir
mkdir -p /tmp/copilot-test/.github/agents
cat > /tmp/copilot-test/.github/agents/dummy-test.agent.md << 'EOF'
---
description: A dummy test agent
---
You are a dummy test agent. Reply with ONLY: DUMMY_AGENT_OK
EOF
# 2. Run with --config-dir (from a workspace with no agents)
cd /some/empty/workspace
copilot --yolo --config-dir /tmp/copilot-test --agent dummy-test -p "hello"
# Result: "Hello! How can I help?" — agent instructions NOT applied, no error
# 3. Compare: nonexistent agent correctly errors
copilot --yolo --agent nonexistent-xyz -p "hello"
# Result: "No such agent: nonexistent-xyz, available: "
# 4. Compare: same agent in ~/.copilot/agents/ works correctly
mkdir -p ~/.copilot/agents
cp /tmp/copilot-test/.github/agents/dummy-test.agent.md ~/.copilot/agents/
copilot --yolo --agent dummy-test -p "hello"
# Result: "DUMMY_AGENT_OK" — agent instructions applied correctlyExpected behavior
Either:
--config-dirshould include<config-dir>/.github/agents/(or<config-dir>/agents/) as an agent discovery path AND load the instructions, or- If
--config-diris not intended for agent discovery, the CLI should return "No such agent" instead of silently running without the agent's instructions.
Environment
copilotCLI installed via Homebrew (/opt/homebrew/bin/copilot)- macOS
- March 2026
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.