github / github/copilot-cli

Persistent default custom agent setting for Copilot CLI startup

オープン
#2,212 コメント 1 件 リアクション 11 件 担当者 0 名 GitHub で見る
area:agents
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

### Describe the feature or problem you'd like to solve

Copilot CLI supports changing agents during a session via `/agent`, and plugin examples/documentation show launching with a specific agent via `--agent`. However, I have not found a documented way to persist a preferred custom or plugin agent as the default startup agent at user scope.

For users who already have a stable primary custom agent, repeatedly re-selecting that agent at startup adds unnecessary friction. In my case, I want Copilot CLI to start with a custom agent such as `oh-my-copilot:atlas` every time, without relying on shell aliases or wrapper scripts.

### Proposed solution

Please add a persistent user-level setting for the default startup agent, including support for built-in agents and installed custom/plugin agents.

One possible shape (proposal only, not existing functionality):

```yaml
defaultAgent: oh-my-copilot:atlas
```

Or an equivalent persisted preference managed by Copilot CLI itself.

This would help by:
- reducing repeated startup steps
- making custom-agent workflows feel first-class
- supporting users who intentionally refine one stable "home" agent for most sessions
- avoiding fragile shell aliases/wrappers as the main workaround

It would also be helpful if the docs explained precedence clearly, for example:
`explicit --agent override > saved default agent > standard built-in default`

### Example prompts or workflows

- I use a custom plugin agent like `oh-my-copilot:atlas` for most sessions and want `copilot` to start with it automatically.
- I want to keep a saved default custom agent for daily work, but still override it for a single launch with `copilot --agent general-purpose`.
- I want a team-standard built-in or custom agent to be the default on startup without asking every user to create shell aliases.

### Additional context

Suggested acceptance criteria:
- users can persist a preferred default agent at user scope
- the setting accepts built-in agents and installed custom/plugin agents
- when no explicit `--agent` is supplied, Copilot CLI starts with the saved default agent
- when `--agent` is supplied, it overrides the saved default for that launch only
- the chosen default is visible somewhere discoverable, such as config output or startup diagnostics
- if the saved agent is missing, renamed, or unavailable, Copilot CLI fails gracefully and falls back to standard default behavior
- the documentation explicitly covers this behavior with a custom/plugin agent example
- optional but useful: a simple command to set or clear the default without manually editing config

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。