Skip to content

Auto-compaction causes the subagent to lose its original context, possibly the system prompt as well #6535

@gasatrya

Description

@gasatrya

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

Image Image

Operating System

WSL 2

Terminal

Windows Terminal

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwindows

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions