Bjørn Johansen4 min readintermediate
One command per issue: git worktree, tmux and Claude Code
Summary
The post introduces `claude-work`, a Bash helper that creates a git worktree, starts a tmux session, and launches Claude Code for a given issue, keeping each AI‑driven task isolated. It also handles safe re‑attachment and cautious cleanup to avoid losing work.
- Use git worktree to create per‑issue isolated checkouts, avoiding branch clutter in the main repo.
- Wrap worktree creation, tmux session start, and Claude Code launch in a single script (claude-work) for repeatable workflow.
- The script safely re‑attaches to existing worktrees/sessions and only deletes them after confirming no uncommitted changes.
- Installation via a self‑contained Bash installer that verifies SHA256 and respects user permissions.
Engineers using AI coding assistants need isolated environments to prevent cross‑issue interference and safe cleanup.
6/10

