📈 GH Trending Explorer 🎲 Surprise me

← all repos

cablate / ctx-handoff-mod

git clone https://github.com/cablate/ctx-handoff-mod.git

Claude Code mod: hands off to a fresh conversation when context fills up, keeps the cache warm while you're away, and turns what you teach Claude into project notes

+0
stars, 24h · #33,389
+~0
stars, 7 days · #33,864
+120
stars, 30 days · #4,118
120
★ total
10
forks · 1 open issues

Star history (as recorded here)

2026-10-20 · 120 ★ 2026-10-22 · 120 ★
LanguageTypeScript
LicenseMIT
Created2026-10-02 (19d ago)
Last push4d ago
Watchers1
OwnerUser

GitHub topics

Links

README excerpt
Have Claude remember what you taught it, catch its usual slips, and pick long sessions back up when you return. 
 English · 繁體中文 · Install · Features · Guide · Changelog 
## Why
Long Claude Code sessions run into the same chores again and again. ctx-handoff takes care of them in the background, so in normal use you type no commands.
| When… | Without it | With ctx-handoff |
|---|---|---|
| the conversation is nearly full | You write a summary, `/clear`, paste it back | A summary is written, the conversation is cleared, and a fresh one continues |
| you step away for an hour | Your next message rereads everything at full price | The cache is kept warm for up to about 4 hours |
| you repeat an instruction | The next conversation forgets it | It becomes a project note, and after 3 times a line in your repo |
| you `/clear` or reopen Claude Code | The new conversation starts blind | It's told where the last one stopped |
| Claude retries a failing command, or says "done" untested | You find out later | Claude gets a one-line nudge right away |
## Install
Requires Claude Code 2.1.287 or later. Tested up to 2.1.302.
 [code] 
Start a new session and type `/handoff`. You should see:
 [code] 
That's it. Update with `claude plugin update ctx-handoff@ctx-handoff-mod`, or turn on auto-update under **Marketplaces** in `/plugin`.
> [!NOTE]
> Built for Claude subscriptions and long sessions (for example on a 1M-context model). On an API key, Bedrock or Vertex the cache lasts only 5 minutes, so run `/handoff refresh off`; everything else works. ctx-handoff is experimental, because Claude Code mods are still in early access.
## What's inside
ctx-handoff is a growing toolkit for long sessions: new features for working with Claude over hours land here.
### Hands off before the context fills (optional)
Off by default, so Claude Code's own compact takes over. Turn on `auto_handoff` in the panel's Settings tab and at 600k tokens it waits for Claude and its subagents to finish, writes a summary that keeps verified work apart from unverified changes, lists what failed, the limits you set in your own words and what was already found out, ends with one next step, clears, and continues in a fresh conversation. Anything you type meanwhile is carried over.
### Keeps the cache warm while you're away
After about 50 idle minutes it sends a tiny request so the conversation cache doesn't expire (and stays ahead of Claude Code's 54-minute idle compaction on large chats), up to 3 times (about 3.5 hours); after that it saves a handoff summary without clearing, so when you return you choose to start fresh from it (`/handoff resume`) or stay where you were (`continue`).
To pause away refreshes and away summaries for just this conversation, click the button at the top of the panel or run `/handoff away pause` (`resume` restarts the timer). Notes updates keep running, and other conversations aren't affected. The panel and `/handoff` also show live background activity and the session's r