opencode
opencode copied to clipboard
Auto-compaction causes the subagent to lose its original context, possibly the system prompt as well
Description
I’m honestly frustrated, this is the second time it has happened.
I have a QA Specialist subagent whose prompt explicitly instructs it to perform only QA-related tasks. However, due to auto-compaction, it loses the original context provided by the main agent. As a result, it suddenly starts reading the planned features document and working on the next phase without my permission.
This is problematic because the subagent was specifically designed to handle QA tasks, not to build or implement new features.
How can I prevent this from happening again in the future?
OpenCode version
1.0.218
Steps to reproduce
Must have main again and subagent.
Screenshot and/or share link
Operating System
WSL 2
Terminal
Windows Terminal