The ExitWorktreeTool provides a safe mechanism for an AI agent to conclude a temporary coding session ("worktree"). It allows the agent to either keep the changes for later or remove them cleanly, while automatically detecting uncommitted work to prevent accidental data loss. Once the session ends, it strictly restores the environment (working directory and caches) to its original state.
Generated by Code IQ