Skip to content

BlogGuide · · 2 min read

When a Claude Code session runs out of context: handing off cleanly

The short answerBefore the context is full, have the session write a handoff note (goal, current state, decisions made, what is left, how to verify), then start a fresh session that reads the note first. A fresh session with a good note beats a long session that has forgotten its own decisions.

What goes wrong in a long session

Every file read, command output and reply takes room in the session’s context window. When it fills, Claude Code summarises the earlier conversation to make space. The summary keeps the gist and drops detail, so the session can lose a decision you made two hours ago, or the reason a certain approach was ruled out.

You usually notice it as repetition: the session re-reads files it already knows, or proposes something you already rejected.

Hand off before it is full

Do not wait for the limit. When the context is around three quarters used and the task is not nearly done, ask the session for a handoff note while it still remembers everything:

Write a handoff note to HANDOFF.md for a fresh session that will continue this task.
Include: the goal, what is done, what is left, decisions made and why,
files changed, how to run and verify, and open questions.

What a good note holds

  • The goal, in the words of whoever asked.
  • The state now: branch, what is committed, what is half done.
  • Decisions and reasons, especially approaches that were tried and dropped.
  • What is left, in order.
  • How to verify: the test command, the page to look at.
  • Open questions for a person.

Leave out the story of how you got there. The next session needs the map, not the diary.

Starting the next session

Open a new session in the same working copy and make reading the note its first step: “Read HANDOFF.md, then continue from What is left.” It starts with an empty context and the whole plan.

In HeyJason

HeyJason shows how full each session’s context is and warns when one is close to its limit. Replace does the handoff for you: the session writes its note, a fresh one (for example billing-worker-v2) reads it and takes over the same tasks, and you can do it from your phone. The old session stays open until you close it.

By The HeyJason team. Found a mistake? support@heyjason.dev

Keep reading

  • Guide

    How to run several Claude Code sessions in parallel

    Give each session one task and its own working copy (a git worktree), name it after the task, and check on a schedule which ones are waiting for you. The limit is your attention, not the number of sessions.

  • Guide

    Claude Code from your phone: what works, and what should stay on the computer

    From a phone it makes sense to answer a session’s question, send a prompt, interrupt it, and start or replace a session. With HeyJason you can also answer a permission prompt by picking one of its options, while sign-ins, settings and anything you cannot judge from a small screen stay on the computer.

  • Guide

    One session per branch: git worktrees with Claude Code

    Run `git worktree add ../repo-task -b task main` for each task and start Claude Code inside that folder. Each session gets its own files and branch, so parallel sessions never overwrite each other.

Get started

Try it on your own sessions.14 days free, no card.

Every feature for 14 days, on up to 3 computers. Then Solo is $10 a month and Pro is $20.

Start on the web

Start freePricing

Or install first, on the computer that runs Claude Code

$ curl -fsSL https://heyjason.dev/install | sh

Install guide