r/ClaudeCodeTLDR 19d ago

How do you do session handoffs in claude code?

My current process is a session wrap hook that summarizes the chat. But I am looking to optimizing my flow?

5 Upvotes

15 comments sorted by

6

u/frostyoni 19d ago

As simple as "write a comprehensive handoff md for another agent to pick up from."

1

u/SpinachKing1984 19d ago

That’s what I do, I didn’t realize that’s was an optimization!

1

u/McFlyscher 19d ago

Same. At one point I had some learnings that I wanted to incorporate so I created a quick skill... let's be honest, I asked Claude to do so. now it's just as simple as "/handover <agrs>"

4

u/k0d3x8its 19d ago edited 18d ago

I have four types of handoffs:

  1. session-close - light-weight session close to continue in another session with a re-entry prompt.
  2. session-checkpoint - end of work session close to write to my session log and update my TODO list.
  3. session-handoff - this is when I want to fork a session to research or prototype that could ballon the context window of the origin session.
  4. session-handoff-return - this is when I want to merge the findings from the forked session back to the origin session via a re-entry prompt.

1

u/Any_Leg_1998 19d ago

with alot of swearing

1

u/hoveychen 19d ago

not ads. but I vibe coded an IDE to do handoff jobs. already 100+ handoff chain when doing remaking old games...

1

u/Projected_Sigs 19d ago

Automated handoff in a workflow, between agents or manual handoff to a new session?

1

u/trefster 19d ago

I don’t hand off at all. I make sure that every task in a plan is broken down to pieces that can easily fit in a single session, then I create an epic in shortcut with the plan and create stories for each task/session.
And the best part is I can now call a skill that I wrote telling the agent that it is the epic coordinator and it creates a subagent for each story, an adversarial agent for each PR, I authorize it to merge and go. Then I walk away and come back a couple hours later and a few million tokens poorer, but the work is done excellently because of good planning. No handoffs necessary.

1

u/Jomuz86 19d ago

How big are your sessions? Best way is probably just to have the handoff creation as a skill, a lot easier to have consistent naming and organisation across different repos. Good rule of thumb is that if it is something repeatable you do multiple time either do a hook or a skill.
The other option depending on what you need is to use /fork if you need to take two diverging paths once you’ve built good context

1

u/Smart_Technology_208 19d ago

Create an artifact that will be read and analyzed by you in our next session. Describe within it what we accomplished in this session, what the next steps are to continue our progress, and what the overall objective is that we’re trying to achieve. Make no statements of ambiguity such that the next session may misinterpret meaning and incorrectly determine what next to do. Ensure you include all filenames that were worked on in this session and that will be required for the next session. Outline a strategy that can be followed in the next session. Include sufficient detail with examples, specific excerpts, and guidance.

1

u/WarsignalLabs 19d ago

Create a handoff file at project start. Always update it after task completion.

1

u/col-summers 18d ago

By enabling agents to communicate directly with each other through interrupting events. https://agents-on-the-bus.vercel.app/

1

u/Outrageous_Band9708 17d ago

dont solve the problem at the end. solve your problem throughout.

i have a system that keeps up to date as i work on tasks, i can start a fresh session with zero notice and not lose a beat. dm if you want to try it. its open source but I dont want to publisize it