Skip to content

Feature: Subagents should support auto compaction #3153

@ghost

Description

Currently, if a subagent goes on a long task and goes over the models context limit, the whole subagent fails.

I think a good solution for this might be auto compaction for sub-agents. If a subagent goes over its context it should reject/remove items that are too big (the last tool/mcp call that sent it over context rejected?) and then auto compact in a way that allows it to continue. This makes subagents resilient and recoverable, because when they go on long tasks and fail it can cost a lot of tokens.

Appreciate all the hard work, opencode is great.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions