← Back to Blog

Start a fresh coding-agent session without losing context

November 9, 2026 · 5 min read

Coming in L2Cache 2.0. The pickup card, the /clear handoff after a cold resume, and Grok Build support arrive in 2.0, which is coming soon. The App Store has version 1.4.6 today.

Every long coding-agent session reaches a point where carrying on costs more than it gives back. Each message gets slower and more expensive, and the agent is still holding on to a task you finished two hours ago. Starting a new session fixes that, but then you're explaining the project from scratch.

A handoff sits in between: a short note, written from the old session, that a new session reads first. This article covers when to start fresh, what a good handoff contains, and how L2Cache writes and adds one for you in Claude Code, Codex and Grok Build.

Why long sessions get expensive and slow

A coding agent sends the whole conversation to the model with every request. Prompt caching makes re-reading that history cheap, but not free, and one reply is usually several requests: in our own Claude Code sessions, a single prompt took a median of five model requests, and ten on average, as the agent read files and ran commands. Each one re-reads the full context.

A fresh session starts small, typically 50–100k tokens of system prompt and project files. On the same numbers, it pays for itself within a prompt or two if the old session is large.

What a handoff should carry

A handoff isn't a transcript dump. A long summary is expensive to load and still misses the detail you'll need five turns later. What a new session needs is enough to get going, and a pointer to the rest. L2Cache's handoff has a fixed shape and stays under about 1.5k tokens:

### Engineering Context Handoff

Continue this work from an earlier session. Check `git status` first:
earlier changes may be uncommitted.

- Goal: Retry expired auth tokens
- Project & Branch: Atlas · auth-retry
- Active Files: Sources/Auth/TokenRefresher.swift, Tests/AuthRetryTests.swift

#### Completed
- Refresh now retries once on a 401, then signs out
- Added tests for the retry and the sign-out path

#### Pending
- Fix the race between two refreshes in AuthRetryTests

#### Where it left off
- Last user request:
  > fix the concurrency race in AuthRetryTests
- Last agent response:
  > Two refresh calls can both see an expired token. Next step: …

Example data. Each field is clipped so the whole note stays short.

When L2Cache's MCP server is connected (Claude Code and Codex), the handoff ends with the old session's ID and asks the agent to look up earlier fixes and decisions there before re-running diagnostics. The new session then pulls in detail only when it needs it. Without the MCP, the handoff lists the decisions made and the approaches already rejected instead, so nothing only L2Cache knows is lost.

How L2Cache adds it for you

L2Cache's hooks record each session as it happens: the files changed, the commands run and a short work summary per turn. The handoff is built from that record, on your Mac. There are three ways it reaches a new session.

1. Automatically, when a new session starts

With Session handoff injection on (Settings › Coding agents; on by default once hooks are connected), starting a new session in the same project adds the previous session's handoff to your first prompt, along with a short brief of the project. Nothing to copy or paste. This path needs the L2Cache app running, since the app writes the handoff when the new session starts.

2. With /clear, after a cold resume

When you resume a Claude Code session whose prompt cache has expired, L2Cache's cold resume guard warns you before the costly first message. Type /clear within 30 minutes in the same folder, and the new session starts with the cold session's handoff instead of reloading the whole thing:

L2Cache · Started fresh with the handoff instead of reloading 241k tokens.

In Codex, /new does the same job.

3. From the pickup card

The Pick up where you left off card on L2Cache's home screen shows each session's size and cache state. Start fresh with handoff copies the handoff so you can paste it anywhere, including into a different agent from the one you were using.

Which agents are supported

AgentLive captureHandoff added automaticallyL2Cache MCP
Claude CodeYesYes, including after /clearYes
CodexYesYes, including after /newYes
Grok BuildYesYesNo
GitHub CopilotYesNo; copy it from the pickup cardNo

Live capture and handoffs use L2Cache's hooks, which are part of Developer Pro and included in the free trial.

Privacy

When to start fresh

Pick up where you left off

L2Cache remembers your coding-agent sessions and hands the important part to the next one.

Download L2Cache for Mac