[BUG] Sub agents context is wiped when the user denies an action

Resolved 💬 8 comments Opened Jul 28, 2025 by PhilipGarnero Closed Jan 5, 2026

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • Claude CLI version: 1.0.61 (Claude Code)
  • Operating System: macOS 15.2
  • Terminal: iTerm2

Bug Description

There is a problematic issue with sub agents right now that prevents them from being useful outside of pure vibe coding (automatic mode). When the user doesn't agree with an edit from the subagent, it gets killed immediately and all of its context is lost. This is very counter productive when the agent already loaded files in memory and was near the correct solution. If we want agents to be real code specialists, we need to be able to interact with them and not have them stuck in a closed box.

Steps to Reproduce

  1. Create a new agent dedicated to writing anything
  2. Have main claude use this agent to write something
  3. Deny the edit -> Main claude kills the agent and discards its context
  4. Provide context to explain why you denied and what should been made better
  5. Main claude spawns a new agent that don't have its old context in memory and does the same mistake or something entirely different

Expected Behavior

  1. Create a new agent dedicated to writing anything
  2. Have main claude use this agent to write something
  3. Deny the edit
  4. Provide context to explain why you denied and what should been made better OR ask the agent to stop
  5. Main Claude understands this is an interaction between user and subagent and retriggers the agent giving it back its context with the added user prompt OR stops

@ollie-anthropic I'm sorry to mention you directly but with the amount of open issues, I wanted to make sure someone from anthropic would not miss this. It's not a small change so I totally understand if this won't be planned, as long as you guys are aware of it, I'm fine.
Btw thanks for having fix my other issue so quickly 🙇 You rock 🤘

View original on GitHub ↗

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