Skip to content

Clarify XDG path support in Copilot CLI best practices documentation #43859

@malik-n

Description

@malik-n

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/copilot/how-tos/copilot-cli/cli-best-practices#use-custom-instructions-files
https://docs.github.com/en/copilot/how-tos/copilot-cli/cli-best-practices#automati...-management

(Basically the whole article refers to ~/.copilot but never to XDG paths.)

What part(s) of the article would you like to see updated?

The article (especially the Supported locations table and session-state info box) lists only ~/.copilot/ as configuration/storage path for all global Copilot CLI files. On Linux and any XDG-compliant system, this is misleading:

Copilot CLI (historically and sometimes currently) respects XDG_CONFIG_HOME and XDG_STATE_HOME, so with standard XDG configuration, files are under $XDG_CONFIG_HOME/copilot/ (and $XDG_STATE_HOME/copilot/) – not under ~/.copilot/.

This produces user confusion, missed configuration, and the impression that Copilot CLI ignores XDG conventions unnecessarily. The docs should:

Expected outcome: users on Linux/Unix systems immediately see valid config paths and do not waste time looking under ~/.copilot when using/packaging Copilot CLI. This is the principle of least surprise when following platform guidelines.

Additional information

The docs reference only ~/.copilot paths everywhere. Users on Linux with XDG-compliant setups get a different actual config location, leading to confusion and missed features/documentation. Multiple upstream issues reference this: github/copilot-cli#1347, github/copilot-cli#1750, github/copilot-cli#1954.

The actual behavior has changed in recent Copilot CLI versions. Current handling may be a regression, and the docs would ideally discuss which platforms/versions see which effect, but the key point is that XDG defaults must be documented clearly for best-practices/first-use guides.

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentThis issue or pull request belongs to the Docs Content teamtriageDo not begin working on this issue until triaged by the team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions