claude-code-handoff 1.6.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -49,7 +49,7 @@ Instead of relying on lossy compression or starting from zero, **claude-code-han
49
49
 
50
50
  The workflow becomes: work until context is full → `/handoff` → `/clear` → `/resume` → continue with full context. No degradation, no amnesia. Just clean handoffs.
51
51
 
52
- **Auto-handoff** (since v1.4) monitors your context usage and **automatically triggers a handoff** when the transcript reaches a configurable threshold (default: **90%**) — so you never forget to save. Since v1.5, the threshold is configured as a **percentage of context** instead of fixed bytes, making it intuitive and portable across different setups.
52
+ **Auto-handoff** (beta, since v1.4) monitors your context usage and **automatically triggers a handoff** when the transcript reaches a configurable threshold (default: **90%**) — so you never forget to save. Since v1.5, the threshold is configured as a **percentage of context** instead of fixed bytes. **Disabled by default** — enable it with `/auto-handoff` when you're ready to try it.
53
53
 
54
54
  Session state is stored in `.claude/handoffs/` (gitignored) — each developer keeps their own context, no conflicts.
55
55
 
@@ -62,7 +62,7 @@ cd your-project
62
62
  npx claude-code-handoff
63
63
  ```
64
64
 
65
- That's it. Open Claude Code and your 6 commands are ready. Auto-handoff is enabled by default at 90%.
65
+ That's it. Open Claude Code and your 6 commands are ready. Auto-handoff is available but **disabled by default** (beta) — run `/auto-handoff` to enable it.
66
66
 
67
67
  ---
68
68
 
@@ -155,10 +155,12 @@ graph TD
155
155
 
156
156
  ---
157
157
 
158
- ## Auto-Handoff (Context Monitor)
158
+ ## Auto-Handoff (Context Monitor) — Beta
159
159
 
160
160
  The biggest risk with handoffs is **forgetting to save**. You're deep in a task, context fills up, and everything is lost. Auto-handoff eliminates this by monitoring your transcript size and **forcing Claude to save the handoff** before it's too late.
161
161
 
162
+ > **Note:** Auto-handoff is a beta feature and is **disabled by default**. Enable it with `/auto-handoff` inside Claude Code.
163
+
162
164
  ### How It Works
163
165
 
164
166
  A [Claude Code hook](https://docs.anthropic.com/en/docs/claude-code/hooks) runs after every Claude response (Stop event). It reads the **actual token count** from Claude's API usage data in the JSONL transcript and compares it against the 200K token context window. When the threshold is exceeded, it **blocks** Claude's next action and forces an immediate handoff save.
@@ -285,7 +287,8 @@ your-project/
285
287
  │ └── auto-handoff.md ← Auto-handoff trigger rules
286
288
  ├── hooks/
287
289
  │ ├── context-monitor.sh ← Stop hook (monitors context size)
288
- └── session-cleanup.sh ← SessionStart hook (cleans old flags)
290
+ ├── session-cleanup.sh ← SessionStart hook (cleans old flags)
291
+ │ └── .auto-handoff-disabled ← Disable flag (remove to enable)
289
292
  ├── settings.json ← Hook configuration
290
293
  └── handoffs/ ← Session state (gitignored)
291
294
  ├── _active.md ← Current workstream
@@ -560,7 +563,7 @@ rm -rf .claude/handoffs/ # ⚠️ deletes all session history
560
563
  A: Yes. Handoff files are gitignored, so each developer has their own session state. No conflicts.
561
564
 
562
565
  **Q: What happens if I forget to `/handoff` before `/clear`?**
563
- A: With auto-handoff enabled (default since v1.4), Claude will automatically save the handoff when the context reaches 90%. Without it, the context is lost for that session — the previous handoff is still there, but you won't have the latest session recorded.
566
+ A: If you've enabled auto-handoff (beta), Claude will automatically save the handoff when the context reaches the threshold. Without it, the context is lost for that session — the previous handoff is still there, but you won't have the latest session recorded.
564
567
 
565
568
  **Q: Can I have unlimited workstreams?**
566
569
  A: Yes. The `archive/` folder has no limit. Each workstream is a single `.md` file.
package/cli.js CHANGED
@@ -62,6 +62,8 @@ copyFile('hooks/context-monitor.sh', path.join(CLAUDE_DIR, 'hooks', 'context-mon
62
62
  copyFile('hooks/session-cleanup.sh', path.join(CLAUDE_DIR, 'hooks', 'session-cleanup.sh'));
63
63
  fs.chmodSync(path.join(CLAUDE_DIR, 'hooks', 'context-monitor.sh'), 0o755);
64
64
  fs.chmodSync(path.join(CLAUDE_DIR, 'hooks', 'session-cleanup.sh'), 0o755);
65
+ // Auto-handoff disabled by default (beta feature)
66
+ fs.writeFileSync(path.join(CLAUDE_DIR, 'hooks', '.auto-handoff-disabled'), '');
65
67
 
66
68
  // 5. Configure hooks in settings.json
67
69
  console.log(` ${YELLOW}[5/10]${NC} Configuring hooks in settings.json...`);
@@ -177,9 +179,8 @@ console.log(` ${CYAN}/switch-context${NC} Switch workstream`);
177
179
  console.log(` ${CYAN}/delete-handoff${NC} Delete handoff(s)`);
178
180
  console.log(` ${CYAN}/auto-handoff${NC} Toggle auto-handoff on/off`);
179
181
  console.log('');
180
- console.log(' Auto-handoff:');
181
- console.log(' Context monitor hook installed (triggers at 90% of context)');
182
- console.log(` Use ${CYAN}/auto-handoff${NC} to enable/disable or adjust threshold`);
182
+ console.log(` Auto-handoff: ${YELLOW}(beta — disabled by default)${NC}`);
183
+ console.log(` Use ${CYAN}/auto-handoff${NC} to enable and configure threshold`);
183
184
  console.log('');
184
185
  console.log(' Files:');
185
186
  console.log(' .claude/commands/ 6 command files');
package/install.sh CHANGED
@@ -71,6 +71,8 @@ download_file "hooks/context-monitor.sh" "$CLAUDE_DIR/hooks/context-monitor.sh"
71
71
  download_file "hooks/session-cleanup.sh" "$CLAUDE_DIR/hooks/session-cleanup.sh"
72
72
  chmod +x "$CLAUDE_DIR/hooks/context-monitor.sh"
73
73
  chmod +x "$CLAUDE_DIR/hooks/session-cleanup.sh"
74
+ # Auto-handoff disabled by default (beta feature)
75
+ touch "$CLAUDE_DIR/hooks/.auto-handoff-disabled"
74
76
 
75
77
  # 5. Configure hooks in settings.json
76
78
  echo -e " ${YELLOW}[5/10]${NC} Configuring hooks in settings.json..."
@@ -306,9 +308,8 @@ echo -e " ${CYAN}/switch-context${NC} Switch workstream"
306
308
  echo -e " ${CYAN}/delete-handoff${NC} Delete handoff(s)"
307
309
  echo -e " ${CYAN}/auto-handoff${NC} Toggle auto-handoff on/off"
308
310
  echo ""
309
- echo -e " Auto-handoff:"
310
- echo -e " Context monitor hook installed (triggers at 90% of context)"
311
- echo -e " Use ${CYAN}/auto-handoff${NC} to enable/disable or adjust threshold"
311
+ echo -e " Auto-handoff: ${YELLOW}(beta — disabled by default)${NC}"
312
+ echo -e " Use ${CYAN}/auto-handoff${NC} to enable and configure threshold"
312
313
  echo ""
313
314
  echo -e " Files:"
314
315
  echo -e " .claude/commands/ 6 command files"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "claude-code-handoff",
3
- "version": "1.6.0",
4
- "description": "Session continuity for Claude Code — 5 slash commands to save, resume, delete, and switch workstreams across /clear",
3
+ "version": "1.7.0",
4
+ "description": "Session continuity for Claude Code — 6 slash commands to save, resume, delete, and switch workstreams across /clear",
5
5
  "bin": {
6
6
  "claude-code-handoff": "./cli.js"
7
7
  },