github / github/copilot-cli

The `--config-dir=PATH` is not working as expected

Offen
#2,197 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area:configuration
Vorherrschende Sprache
Shell
Sterne
11.2k
Forks
1.9k
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
6

Beschreibung

### Describe the bug

Here is my situation:

1. I have a `~/.copilot/config.json`.
2. I run `copilot` with `--config-dir .copilot` which I want to set `./.copilot` as my primary config directory.

I found that during the execution of Copilot CLI, session data is written to the ./.copilot/ folder, but `config.json` reads the contents of `~/.copilot/config.json`. That's so strange!

### Affected version

GitHub Copilot CLI 1.0.9.

### Steps to reproduce the behavior

1. Create a `~/.copilot/config.json` which assign a model to `gpt-5-mini`.
2. Create a `./.copilot/config.json` which assign a model to `claude-sonnet-4.6`.

Run `copilot --yolo --config-dir .copilot` which will load `gpt-5-mini` model.

### Expected behavior

The command arguments should take precedence over and be higher than ~/.copilot/config.json

### Additional context

_No response_

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.