[BUG] Agents dismissed while working

Resolved 💬 2 comments Opened Oct 22, 2025 by scotch83 Closed Oct 23, 2025

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Issue

When I am working with an agent, in between some work, if something goes wrong, there is a high incidence of Claude switching to the main profile instead of keeping using the agent.

I think activated agents should not be dismissed randomly in between work loosing all the context gathered until then

What Should Happen?

The agent should keep doing its work even when something is missing and stops to ask the user for some further information or feedback.

Error Messages/Logs

Steps to Reproduce

  1. Create an agent
  2. Start Claude Code and request to work with a specific agent on a complex task
  3. Interact long enough and the agent will be dismissed and replaced by default Claude Code

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

v2.0.25

Platform

Google Vertex AI

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

<img width="1521" height="594" alt="Image" src="https://github.com/user-attachments/assets/72a558fc-d005-49a2-91fb-9bb683ef67e7" />

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗