[BUG] Sub agents context is wiped when the user denies an action
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
- Create a new agent dedicated to writing anything
- Have main claude use this agent to write something
- Deny the edit -> Main claude kills the agent and discards its context
- Provide context to explain why you denied and what should been made better
- 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
- Create a new agent dedicated to writing anything
- Have main claude use this agent to write something
- Deny the edit
- Provide context to explain why you denied and what should been made better OR ask the agent to stop
- 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 🤘
8 Comments
please fix
or add a way to interact with the subagents directly
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Yes this is so frustrating. I want to be able to press ESC to give feedback to the subagent.
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.
Commenting to keep this alive as it is still a problem last I checked.
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.
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.