[Bug] Context leak with background subagents causing unexpected context limit crash
Bug Description
My chat with many background subagents (8), crashed with no context, and unable to /compact. It is unexpected for the main thread to have hit anywhere near the context limit based on it's own work, and it happened once 2 subagents had completed. I've noticed this happen before in recent releases, which leads me to think there is a context leak with background subagents specifically. Perhaps it is from the main agent frequently checking-in on the subagents, or something else. But is is extremely negatively impactful and wastes significant tokens. I would also attach session logs for the relevant thread, but .jsonl files aren't supported here.
Environment Info
- Platform: darwin
- Terminal: vscode
- Version: 2.0.75
- Feedback ID:
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗