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

Status Closed — not planned
Maintainer reply None cached
Activity 8 comments · opened Jul 28, 2025 · 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 ↗

8 Comments

arunjish · 1 year ago

please fix

AlexGS74 · 1 year ago

or add a way to interact with the subagents directly

github-actions[bot] · 1 year ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/2148
  2. https://github.com/anthropics/claude-code/issues/4567
  3. https://github.com/anthropics/claude-code/issues/4850

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

willfindlay · 1 year ago

Yes this is so frustrating. I want to be able to press ESC to give feedback to the subagent.

github-actions[bot] · 8 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

drod3763 · 8 months ago

Commenting to keep this alive as it is still a problem last I checked.

github-actions[bot] · 7 months ago

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] · 7 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.