Handing Off.mp4

Handing Off

In a previous lesson we talked about compacting and specifically the dangers of auto-compacting where you pull in a bunch of context just to shrink it down again to create another little layer of sediment that keeps growing and growing and growing.

Diagram showing context layers building up with auto-compacting

The way to avoid this, of course, is just to clear the context every time so you start with a fresh session.

But what happens in situations where you're halfway through a session, let's say, and you think of an idea that you want to do? Let's say you discover a file which needs a little bit of updating or a test that needs fixing.

You could do this in your current session, of course, but you don't quite know how long it'll take. And it might take so long that you don't have any budget left to do the thing that you wanted to do in the first place.

Diagram showing context budget running out

It doesn't really make sense to clear the context in this situation because you still need to complete the blue task here, it's just this little yellow task also needs to be done at some point.

And in fact, this little yellow task really just needs its own context window to complete. It doesn't even need all of the context with the blue, it's just we happen to discover it during this little blue session here.

Yellow task shown needing its own context window

So what would be great is if we could just take this blue session here and compact it into another context window. Because then the blue could feel free to grow in its own context window, and this little yellow task over here, the bug fix or the test fix, could just complete in its own context window.

Diagram showing blue session compacted into separate context window

Introducing Handoff

I've been messing about with this idea for a while and initially I thought this needs to be called /compact-to-file. But then it came up with a slightly snappier name: Handoff.

/handoff allows you to create a temporary markdown file that you can use for handing off between agents. And it's really, really handy in a few different situations.

Handoff skill description

How the Skill Works

First let's take a little look at the skill itself.

The skill says: