Post

@mariozechner.at @me.snemarch.dk meanwhile i figured out the correct framing for my context compactor so the model uses it extensively: subagent launching! we pretend we're the subagent when the checkpoint is set, and when subagent_result is called, we compact, and the model buys the deception :)

0 reposts0 likes

So... Do you launch a compaction every time you've invoked a subagent? Or have you replaced normal compaction with a subagent launch, and swap the current context with the subagent result?

the model invokes the agent, the "agent" runs in the same context (we basically just switch roles for the context) until it "returns" a result, which causes the compaction. so after compaction, it looks to the context like it launched a subagent and it returned work, and it can continue with it.

the benefit here compared to a "real" subagent invocation is that the "agent" of course sees the complete existing context so can continue exactly the way the main context would.