by superasn · 3mo ago · 0 comments
Basically:
- /handoff file creates a short document with the important context from your current session and maybe next steps as checklist.
- You can then start a fresh session with /continue file
- You can also hand the work from Claude to ChatGPT, or the other way around. Very useful at time of session limits.
- Plus your handoff files becomes a useful piece of project memory that you can reference later.
I find this much more useful than /compact or /clear because the context is saved in something portable instead of being tied to one session and i've seen better results doing this every 20 messages or so than running long sessions.
I've been doing this since I started agentic development, and have a whole framework based on this; Simply put I define workflow s that output templated files for everytype of tasks that happens in development.
It's a powerful pattern I'd recommend everyone.
I now feel a bit silly but I reinvented the wheel during my last lil project and indeed found it very powerful. A variant of it is the "implementation (handover) prompt" when I conclude the planning session with plans and design documents, updated handoff, clean tree and a file for a new Opus implementing orchestrator (unusually do a single, highly specific implementer and a single, highly specific tester).
After implementation and task-level tests I end up with a long and very detailed implementation progress ledger and a summary findings from the orchestrator.
Then in the new session I do the whole branch tests.
Works really well, uses much less tokens than any other approach with more of Opus and very little repetitions/corrections.
- Prefix-numbered sets of documents, keeping them clustered visually and easily referenced by humans and agents. (124.5 = docset 125, phase 5) - Each doc gets a suffix. Most of the time STRATEGY is the first doc. Sometimes NOTES, DISCUSSION, or HANDOFF though. - Once the strategy doc is comprehensive, the multi-phase checklist PLAN doc can emerge. - During execution, the agent drives the PLAN while purposefully expanding lightly scaffolded phases before entry. - As the user, I drive a PROGRESS doc during the PLAN execution. This tracks the progression of my own questions and the important work summaries that I need for tracking the current work trajectory and for historic analysis over past decision-making. - Any concern that exceed the scope of the active docset numbers calls for a new one. - A "docs/archive" folder is kept where I sweep docsets into numbered eras.
I have aliases and templates too, but DDD is so simple that it's overkill.
Any modern reasoning agent can take the plain explanation above and understand you effortlessly when you say "open a new docset strategy" or "read docset 125 and proceed".
And I think plan files should focus on general ideas and invariants, not do “implementation as prose”. That way they perform as mini-ADRs that are useful historically, especially to mine why the system is the way it is.
I managed even the orchestrator to NOT read the plan whole, at once, but in sections.
The most useful thing is the task ledger the task agent leaves behind, which alongside its structured status message makes a very resilient handoff between all stages.
It might be even better if the harness were to automatically write a handoff note under some circumstances? If the user is away and the cache is going to expire, that would be a good time to do it.
I've been asking Claude to remember important points from our session, or future tasks. Then /clear and continue.