Describe the bug
When attempting to create a new User agent using the Copilot CLI, the tool does not respect the XDG_CONFIG_HOME environment variable.
Furthermore, there seems to be a hardcoded path error. While the interactive prompt correctly displays the intended path based on standard conventions (~/.config/copilot/agents/), the CLI actually creates the file in an incorrectly formatted path: ~/config/.copilot/agents/ (dropping the dot from .config and adding a dot to copilot).
Actual Behavior
The CLI reports (and actually creates the file at):
/Users/<username>/config/.copilot/agents/test-agent.agent.md
Notice the missing . before config and the erroneous . added before copilot.
Screenshots / Evidence
Environment
- OS: macOS
- Copilot CLI Version: [1.0.5]
- Shell: [zsh]
Affected version
1.0.5
Steps to reproduce the behavior
- Ensure the
XDG_CONFIG_HOME environment variable is set (e.g., export XDG_CONFIG_HOME="$HOME/.config").
- Initiate the Copilot CLI command to create a new agent.
- When prompted "Where should the agent be created?", select option 2:
User (~/.config/copilot/agents/).
- Observe the terminal output confirming the creation path.
Expected behavior
Based on the XDG_CONFIG_HOME variable and the CLI's own prompt, the agent should be created at:
/Users/<username>/.config/copilot/agents/test-agent.agent.md
Additional context
$ echo $XDG_CONFIG_HOME -> /Users/akoken/.config
- Prompt shows:
2. User (~/.config/copilot/agents/)
- Success message shows:
Created agent at /Users/akoken/config/.copilot/agents/...
Describe the bug
When attempting to create a new User agent using the Copilot CLI, the tool does not respect the
XDG_CONFIG_HOMEenvironment variable.Furthermore, there seems to be a hardcoded path error. While the interactive prompt correctly displays the intended path based on standard conventions (
~/.config/copilot/agents/), the CLI actually creates the file in an incorrectly formatted path:~/config/.copilot/agents/(dropping the dot from.configand adding a dot tocopilot).Actual Behavior
The CLI reports (and actually creates the file at):
/Users/<username>/config/.copilot/agents/test-agent.agent.mdNotice the missing
.beforeconfigand the erroneous.added beforecopilot.Screenshots / Evidence
Environment
Affected version
1.0.5
Steps to reproduce the behavior
XDG_CONFIG_HOMEenvironment variable is set (e.g.,export XDG_CONFIG_HOME="$HOME/.config").User (~/.config/copilot/agents/).Expected behavior
Based on the
XDG_CONFIG_HOMEvariable and the CLI's own prompt, the agent should be created at:/Users/<username>/.config/copilot/agents/test-agent.agent.mdAdditional context
$ echo $XDG_CONFIG_HOME->/Users/akoken/.config2. User (~/.config/copilot/agents/)Created agent at /Users/akoken/config/.copilot/agents/...