iso-code
Safe git worktree lifecycle management for AI coding agents.
iso-code is a Rust library + CLI + MCP server that solves documented data-loss bugs in Claude Code, Cursor, Claude Squad, OpenCode, and VS Code Copilot by providing a shared, battle-tested worktree management foundation.
Problem
Every major AI coding orchestrator independently implements worktree management and each has critical bugs:
- Silent data loss (unmerged commits deleted without warning)
- Unbounded resource consumption (hundreds of orphaned worktrees)
- Nested worktree creation after context compaction
- git-crypt corruption on worktree creation
iso-code fixes all of these with a single shared library.
Installation
[]
= "0.1"
CLI:
cargo install iso-code-cli
Basic Usage
use ;
CLI
MCP Server Configuration
Claude Code (~/.claude/claude_desktop_config.json)
Cursor (.cursor/mcp.json)
VS Code Copilot (.vscode/mcp.json)
OpenCode (opencode.json)
Claude Code Hook Integration
Add to your Claude Code config:
Safety Guarantees
- Never deletes branches with unmerged commits (5-step check)
- Never leaves partial worktrees on disk (cleanup-on-failure)
- Never corrupts git-crypt repos (post-create verification)
- Never creates nested worktrees (bidirectional path check)
- Never evicts locked worktrees (unconditional protection)
- State.json is crash-safe (atomic write via tmp + fsync + rename)
License
Licensed under either of Apache License 2.0 or MIT License at your option.