handoff
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHandoff - Session Cycling for Gas Town Agents
会话切换 - Gas Town Agents的会话轮转
Hand off your current session to a fresh Claude instance while preserving work context.
在保留工作上下文的同时,将当前会话切换至全新Claude实例。
When to Use
使用场景
- Context getting full (approaching token limit)
- Finished a logical chunk of work
- Need a fresh perspective on a problem
- Human requests session cycling
- 上下文即将耗尽(接近令牌限制)
- 完成一个逻辑工作块
- 需要对问题有新的视角
- 用户要求进行会话轮转
Usage
使用方法
/handoff [optional message]/handoff [可选消息]How It Works
工作原理
- If you provide a message, it's sent as handoff mail to yourself
- respawns your session with a fresh Claude
gt handoff - New session auto-primes via SessionStart hook
- Work continues from your hook (pinned molecule persists)
- 若你提供了消息,该消息将作为切换邮件发送给自己
- 会重启你的会话,生成全新Claude实例
gt handoff - 新会话将通过SessionStart挂钩自动初始化
- 工作将从你的挂钩点继续(已固定的molecule会保留)
Examples
示例
bash
undefinedbash
undefinedSimple handoff (molecule persists, fresh context)
简单切换(保留molecule,上下文重置)
/handoff
/handoff
Handoff with context notes
附带上下文说明的切换
/handoff "Found the bug in token refresh - check line 145 in auth.go first"
undefined/handoff "在令牌刷新逻辑中发现bug - 先检查auth.go的第145行"
undefinedWhat Persists
保留内容
- Hooked molecule: Your work assignment stays on your hook
- Beads state: All issues, dependencies, progress
- Git state: Commits, branches, staged changes
- 挂钩的molecule:你的工作任务会保留在挂钩点
- Beads状态:所有问题、依赖项、进度
- Git状态:提交记录、分支、暂存的更改
What Resets
重置内容
- Conversation context: Fresh Claude instance
- TodoWrite items: Ephemeral, session-scoped
- In-memory state: Any uncommitted analysis
- 对话上下文:全新Claude实例
- TodoWrite项:临时的、会话级别的内容
- 内存状态:所有未提交的分析内容
Implementation
实现方式
When invoked, execute:
-
If user provided a message, send handoff mail:bash
gt mail send <your-address> -s "HANDOFF: Session cycling" -m "<message>" -
Run the handoff command:bash
gt handoff
The new session will find your handoff mail and hooked work automatically.
调用时执行以下步骤:
-
若用户提供了消息,发送切换邮件:bash
gt mail send <your-address> -s "HANDOFF: Session cycling" -m "<message>" -
运行切换命令:bash
gt handoff
新会话会自动找到你的切换邮件和挂钩的工作任务。