Rollback and summarise tool for compacting only a chosen suffix of the conversation

Feature request for product/service

Chat

Describe the request

An agent should be able to perform a rollback-and-summarise operation. This would remove some chosen suffix of the conversation, replacing it with a summary the agent provides when performing the rollback operation.

The goal of this is to be an alternative to synchronous subagents for handling long tasks.

A subagent runs in an isolated context, which is not always desirable. It loses important context, and it relies on the parent agent to do a good job of automatically writing a prompt for the sub agent.

A rollback feature would allow verbose tasks and tool calls to be handled in the primary context, and then just that part of the conversation could be compacted so that only the important conclusions are retained.

Operating System (if it applies)

Windows 10/11
MacOS
Linux