What it is
auto-handoff is a Claude Code plugin that watches for idle sessions. After 50 minutes without activity (configurable) it runs a handoff command while the one-hour prompt cache is still warm. The bundled skill, /auto-handoff:handoff, writes a markdown file under docs/handoffs/ so a fresh session can resume the work.
Who it's for
- Claude Code users who leave long sessions idle and want to avoid paying full price to re-read a cold cache
- Developers who want an automatic written record of goal, status, decisions and next steps when they walk away
Requirements
Requirements
- Claude Code (developed and tested on 2.1.289)
- Function hooks plugin API, which is early access and may change between Claude Code releases
Setup
Install the plugin
Add the marketplace and install the plugin. It loads at the next session start.
bash/plugin marketplace add obie/auto-handoff /plugin install auto-handoff@auto-handoffConfigure options (optional)
Run /plugin configure auto-handoff inside Claude Code, or set values from a shell, for example a custom command.
bashecho '{"command": "my-plugin:my-handoff"}' | claude plugin configure auto-handoff@auto-handoff --values-stdin
Examples
Install from the marketplace
bash/plugin marketplace add obie/auto-handoff
/plugin install auto-handoff@auto-handoffWhat it does: Adds the marketplace and installs the plugin; it takes effect at the next session start.
Use a custom handoff command
bashecho '{"command": "my-plugin:my-handoff"}' | claude plugin configure auto-handoff@auto-handoff --values-stdinWhat it does: Replaces the default auto-handoff:handoff command. The custom command needs allowed-tools or a permissive permission mode to run unattended.
Validate and test during development
bashclaude plugin validate .
claude plugin test .What it does: Validates the plugin and runs the tests in tests/ against a mocked clock.
Link a local clone for development
bashgit clone https://github.com/obie/auto-handoff ~/projects/auto-handoff
ln -s ~/projects/auto-handoff ~/.claude/skills/auto-handoffWhat it does: Claude Code loads the linked folder as auto-handoff@skills-dir at the next session start and reloads the hooks module on file save.
Pros & cons
Pros
- Pro:Runs the handoff while the cache is warm, avoiding the full-price re-read of a cold cache
- Pro:Bundled skill writes a structured handoff file (goal, status, decisions, dead ends, files, verification commands, next steps, open questions) and commits nothing
- Pro:Skips the handoff if the timer fired late, such as after a laptop slept, so it doesn't incur the cost it aims to avoid
- Pro:Idle time and command are configurable
Cons
- Con:Built on an early-access hooks API that may change between Claude Code releases
- Con:The 50-minute default assumes the one-hour cache; the plugin can't detect a five-minute cache, so minutes must be lowered manually
- Con:The timer lives in the Claude Code process, so it stops when you quit, and the handoff turn itself costs cached reads
Images
