Who it is forA developer in a long Claude Code session on a large-context model who keeps hitting the context limit mid-task.
The problemWhen the conversation nears full, you have to write a summary by hand, run /clear and paste the summary back in.
The outcomeAt the threshold, a summary is written, the conversation is cleared and a fresh one continues, with anything typed in the meantime carried over.
What you need first
- Claude Code 2.1.287 or later (the README says it is tested up to 2.1.302)
- A Claude subscription sign-in, or an API key, Bedrock or Vertex setup with the cache refresh turned off
- Access to the Claude Code plugin commands in a terminal
Steps
- Run
claude plugin marketplace add cablate/ctx-handoff-mod - Run
claude plugin install ctx-handoff@ctx-handoff-mod - Start a new session and type
/handoff; check that it shows the context and threshold lines - Open the panel with
/handoff panel, go to the Settings tab (5), and turn onauto_handoff - Keep working; when the context reaches the threshold, confirm the new conversation starts with the summary
Prompt for your agent
In Claude Code, install the ctx-handoff-mod plugin from cablate/ctx-handoff-mod, then turn on auto_handoff in the /handoff panel Settings tab for <project path>. Expected output: `/handoff` prints a context line with a threshold of 600000. Verify that the setting shows as on before the session ends.
Caveat. The README says the plugin is experimental because Claude Code mods are still in early access, and auto_handoff is off by default.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for cablate/ctx-handoff-mod and "Hand off a full Claude Code session to a fresh chat"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer