github / github/copilot-cli

Custom agent selection reverts to Default agent mid-session

Open
#4,047 0 comments 0 reactions 0 assignees View on GitHub
area:agents area:sessions
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
6

Description

**Description**
When starting a session with a specific custom agent explicitly selected for the initial prompt, the agent selection reverts to the Default agent as the session progresses (during subsequent reasoning/turns).

**Steps to reproduce**
1. Start a new session/kickoff prompt with a specific custom agent selected.
2. Observe the initial prompt runs under the selected agent.
3. As the conversation continues and further thinking/turns happen, the session shows/reverts to the 'Default agent'.

**Expected behavior**
The explicitly selected custom agent should remain active for the duration of the session (or at least persist across turns) unless the user explicitly changes it.

**Actual behavior**
Agent selection reverts to Default agent after the initial prompt.

**Additional context**
Reported via Copilot CLI session. Unclear whether this is a UI display issue (mislabeling) or an actual functional reversion of agent config underneath.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in a Copilot CLI session using a selected custom agent, then compare the displayed agent with the agent configuration during subsequent turns. Trace the session and agent-selection entry points to determine whether the reversion is functional or only a display problem; done means the selected custom agent remains active across turns and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.