Skip to main content
Changelog
v0.8.12026-04-13by Fatih

Lazy worktree creation: branches named after the actual task

Sessions now start on main with no upfront worktree. The first file edit triggers a gate that asks Claude to create a properly-named branch. Branch slugs are always meaningful because Claude knows the task by then.

improvement

What changed

Before: every session auto-created a worktree at SessionStart before Claude knew what it was working on. Branch names were timestamps or generic slugs.

After: sessions start clean on main. The first Edit, Write, or NotebookEdit on main triggers a PreToolUse gate (tonone-worktree-gate.js) that blocks the edit and asks Claude to create a branch first. By the time the gate fires, Claude knows the task, so the slug is meaningful and no rename is ever needed.

Removed

tonone-worktree-session.js and its session-YYYYMMDD-HHMMSS branch naming are removed. No more stale worktree branches accumulating per session.

Example

# User: fix the auth token expiry bug
# Claude starts implementing, hits the gate
# Gate: create a branch first
# Claude: git worktree add -b fix-auth-token-expiry
# Branch name reflects the actual task