github / github/copilot-cli

Persistent default custom agent setting for Copilot CLI startup

Đang mở
#2,212 1 bình luận 11 reaction 0 người được giao Xem trên GitHub
area:agents
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

### 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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.