<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kale Myrk</title>
    <description>The latest articles on DEV Community by Kale Myrk (@kale_myrk).</description>
    <link>https://dev.to/kale_myrk</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4206631%2F25329681-a359-40bc-9d54-5da8da886af9.png</url>
      <title>DEV Community: Kale Myrk</title>
      <link>https://dev.to/kale_myrk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kale_myrk"/>
    <language>en</language>
    <item>
      <title>How do you review code written by Claude Code or Codex? A terminal workflow</title>
      <dc:creator>Kale Myrk</dc:creator>
      <pubDate>Sat, 07 Nov 2026 16:57:09 +0000</pubDate>
      <link>https://dev.to/kale_myrk/how-do-you-review-code-written-by-claude-code-or-codex-a-terminal-workflow-1en5</link>
      <guid>https://dev.to/kale_myrk/how-do-you-review-code-written-by-claude-code-or-codex-a-terminal-workflow-1en5</guid>
      <description>&lt;p&gt;If you use Claude Code, Codex CLI or Aider, you now read more code than you write. The agent edits twelve files, you run git diff, and the diff scrolls past in the order the agent touched things, not in the order that matters.&lt;/p&gt;

&lt;p&gt;This post describes how I review that kind of change in a terminal, and the open-source tool I built for it, &lt;a href="https://github.com/myrk-kale/klaub" rel="noopener noreferrer"&gt;Klaub&lt;/a&gt;. Short version: read functions instead of hunks, let a deterministic ranking tell you where to look first, make the agent explain the choices it made, and ask it questions about whatever is on your screen.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9npwsep8wbytlq0m7fo3.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9npwsep8wbytlq0m7fo3.gif" alt="Klaub in the terminal: a queue ranked by risk, the contract of a changed function, the decisions of the change one per screen, and a flow diagram" width="760" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why is reviewing AI-generated code harder than reviewing a colleague's?
&lt;/h2&gt;

&lt;p&gt;A colleague's pull request comes with a description, a history and a person you can ask. An agent's change comes with a chat transcript you probably skimmed.&lt;/p&gt;

&lt;p&gt;Sonar's 2026 State of Code survey of more than 1,100 developers found that 96% do not fully trust AI-generated code, and only 48% said they always verify it before committing. 38% said reviewing AI code takes more effort than reviewing a colleague's. Sonar sells code verification and the numbers are self-reported, so I read them as a signal and not as a measurement. The bottleneck has moved from writing code to reading it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a good way to review code an AI agent wrote?
&lt;/h2&gt;

&lt;p&gt;Three things help most.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Review by function, not by line. An agent rewrites a function top to bottom, and a line diff shows that as a wall of red and green. Seeing the old and the new version of the whole function in the same place is faster to read.&lt;/li&gt;
&lt;li&gt;Start with the riskiest change. A changed public signature that a route reaches deserves your attention before a renamed local variable.&lt;/li&gt;
&lt;li&gt;Know why the agent chose what it chose. A diff shows what changed. The choices behind it, such as a new storage format or a swallowed exception, are rarely written down anywhere.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Klaub does the first two by analyzing the code and the third by asking your agent. The next sections show each one.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you know which AI-written change to read first?
&lt;/h2&gt;

&lt;p&gt;Klaub parses your repository (Python, JavaScript, TypeScript, Rust, Go and Java get full analysis), matches symbols across the two versions and puts every changed function, class and file in a queue ordered P0 to P3. Press &lt;code&gt;w&lt;/code&gt; on any entry and it lists the points that put it there.&lt;/p&gt;

&lt;p&gt;In the sample repository from the demo above, a payment function lands at P0 with a score of 83:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;+25: the declaration of a public symbol changed&lt;/li&gt;
&lt;li&gt;+20: an external entrypoint (a route) can reach it&lt;/li&gt;
&lt;li&gt;+15: it touches a sensitive area (&lt;code&gt;payments&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;+15: an error is discarded, and the finding is marked as introduced by this change&lt;/li&gt;
&lt;li&gt;+8: no associated test was found&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There is no model in that ranking, so the same change gives the same queue every time, and each number can be taken apart. The priority orders your reading. It does not say how severe a problem is, and a P3 can still matter.&lt;/p&gt;

&lt;p&gt;Press &lt;code&gt;i&lt;/code&gt; on a unit to see its contract: parameters before and after, the routes it serves, the exceptions it raises, its direct callers and the entrypoints that reach it. Each hop is marked resolved, heuristic or unresolved, because a missing path does not prove that nothing depends on the code.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you find out what technical decisions an AI agent made?
&lt;/h2&gt;

&lt;p&gt;Klaub has a Decisions window for this. If the file does not exist, it puts a request in your agent's input asking for the technical decisions of the change, as JSON. You press Enter yourself. The request carries everything the agent needs, so you install nothing.&lt;/p&gt;

&lt;p&gt;Each decision is written for someone who knows nothing about the code or about what the product does in that place: the context, what was decided, why, the alternatives with their trade-offs, what it changes, and the question you are asked. It also says whether the decision was stated in the change (a commit message, a comment, a test) or inferred from the diff. The inferred ones are the ones worth questioning, because nobody wrote them down.&lt;/p&gt;

&lt;p&gt;Klaub validates the file against the snapshot before showing it, and shows nothing that fails validation or belongs to another state of the code. Then one decision fills the screen, quiz style. You press &lt;code&gt;a&lt;/code&gt; to approve, &lt;code&gt;d&lt;/code&gt; to reject, &lt;code&gt;c&lt;/code&gt; to comment, and the arrows to move. At the end, the rejected and commented ones can go back to the agent as one short instruction.&lt;/p&gt;

&lt;p&gt;In the sample repository the agent listed five decisions. Two of them were worth stopping on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A failed call to the payment provider is caught and ignored, so an order can be saved as if it had been paid. Nothing in the diff says why.&lt;/li&gt;
&lt;li&gt;A new endpoint lists the orders of any user, and checks that the caller is logged in but not that the caller is that user.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both are easy to miss in a line diff, because each one is something the code does not check. One caveat: the decisions are the agent's account of its own work. Klaub validates the format and the references, not the truth, so treat them as a reading guide.&lt;/p&gt;

&lt;h2&gt;
  
  
  Can you ask your coding agent about the code you are reviewing?
&lt;/h2&gt;

&lt;p&gt;Yes. If you start the agent through Klaub:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;klaub wrap claude      &lt;span class="c"&gt;# or: klaub wrap codex&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Klaub runs the agent in its own session with a reader window next to it. &lt;code&gt;Shift+→&lt;/code&gt; goes to the reader and &lt;code&gt;Shift+←&lt;/code&gt; goes back. Press &lt;code&gt;t&lt;/code&gt; on any screen in the reader and it puts a description of what you are looking at into the agent's input: the unit, how it changed, the lines on screen and the git diff, or the whole decision card, or the steps of a diagram. You land in the agent, type your question and press Enter.&lt;/p&gt;

&lt;p&gt;The text tells the agent not to change or run anything before your question. It is one line, sent as a bracketed paste, and Klaub never presses Enter.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you see how an AI-written change actually runs?
&lt;/h2&gt;

&lt;p&gt;The Flow window draws the execution path as a diagram: a box per step, connectors between them, the steps the change touched outlined, and the certainty of each step marked. You set a focus in free text and choose the level of detail, from high-level components to individual functions, and whether to reach end to end through the frontend and storage. Klaub builds the request, your agent writes the diagram file, and it appears when the file is saved.&lt;/p&gt;

&lt;p&gt;What the agent claims is treated as a hypothesis. If a step names a symbol that does not exist in the index, the difference is shown.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is there a code review tool that works offline, without an LLM?
&lt;/h2&gt;

&lt;p&gt;Klaub makes no network requests, has no telemetry and needs no account. The analysis is deterministic. A language model is involved in exactly two places, the decisions and the flow diagram, and in both it is your own agent that writes the file, not Klaub.&lt;/p&gt;

&lt;p&gt;The trade is real. Klaub cannot find a bug that requires understanding what the code is for, because it applies fixed rules and a call graph. It finds what those can show: swallowed errors, queries built from dynamic text, secrets in code, I/O inside loops, dynamic code execution, unsafe blocks and disabled certificate checks.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does this compare with other ways to review agent code?
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Approach&lt;/th&gt;
&lt;th&gt;What you read&lt;/th&gt;
&lt;th&gt;Where it falls short&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;The diff in the agent's own output&lt;/td&gt;
&lt;td&gt;Line diff, in the order of the edits&lt;/td&gt;
&lt;td&gt;No ranking, no callers, and a long session scrolls away&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A pull request on a hosting site&lt;/td&gt;
&lt;td&gt;Line diff, after you push&lt;/td&gt;
&lt;td&gt;The code leaves your machine before the first read, and the loop with the agent is slow&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A second AI model as reviewer&lt;/td&gt;
&lt;td&gt;The model's findings&lt;/td&gt;
&lt;td&gt;Findings are probabilistic, so you still read the code to know which to believe&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Klaub&lt;/td&gt;
&lt;td&gt;Functions ranked by risk, with contracts, callers and the agent's decisions&lt;/td&gt;
&lt;td&gt;Fixed rules find what rules and a call graph can show, and the decisions are the agent's own account&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;They combine well. A second model's findings, Klaub's queue and your tests answer different questions.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you install Klaub?
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;myrk-kale/tap/klaub
&lt;span class="nb"&gt;cd &lt;/span&gt;my-project
klaub review
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It runs on macOS and Linux and needs Git on your &lt;code&gt;PATH&lt;/code&gt;. &lt;code&gt;cargo install klaub --locked&lt;/code&gt; works too, and the &lt;a href="https://github.com/myrk-kale/klaub" rel="noopener noreferrer"&gt;README&lt;/a&gt; lists release archives and an install script. Windows is not supported yet. &lt;code&gt;klaub review&lt;/code&gt; opens the reader on what changed since &lt;code&gt;HEAD&lt;/code&gt;, with the riskiest change first. Press &lt;code&gt;?&lt;/code&gt; for the keys.&lt;/p&gt;

&lt;p&gt;Klaub is MIT licensed. If you try it on a real agent session, I would like to hear what the queue got wrong, because that is where the ranking rules improve. Issues are open at &lt;a href="https://github.com/myrk-kale/klaub/issues" rel="noopener noreferrer"&gt;github.com/myrk-kale/klaub&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is Klaub?
&lt;/h3&gt;

&lt;p&gt;A free, open-source terminal application for reviewing code changes by function and class, ranked by risk. It was built for reading what AI coding agents write, and it works on any Git change.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which AI coding agents does Klaub work with?
&lt;/h3&gt;

&lt;p&gt;Codex CLI, Claude Code and Aider are the targets. Any interactive terminal program can run through &lt;code&gt;klaub wrap&lt;/code&gt;, and &lt;code&gt;klaub review&lt;/code&gt; works with no agent at all.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does Klaub send my code anywhere?
&lt;/h3&gt;

&lt;p&gt;No. It makes no network requests. Reviews and your answers are files under &lt;code&gt;.klaub/&lt;/code&gt; in your repository. What your agent does with a request is up to the agent you chose.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does Klaub press Enter in my agent?
&lt;/h3&gt;

&lt;p&gt;No. It shows the destination and the exact text first, sends one line as a bracketed paste, and you press Enter. The &lt;code&gt;t&lt;/code&gt; shortcut skips the confirmation by default and works the same way, and &lt;code&gt;ask_agent_confirms = true&lt;/code&gt; in the config makes it ask.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which languages does Klaub analyze?
&lt;/h3&gt;

&lt;p&gt;Python, JavaScript, TypeScript (including TSX), Rust, Go and Java get full semantic analysis. Other files are listed, shown whole and compared as text.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>cli</category>
      <category>codereview</category>
    </item>
    <item>
      <title>Git worktrees using too much disk space? Copy-on-write can help</title>
      <dc:creator>Kale Myrk</dc:creator>
      <pubDate>Sun, 25 Oct 2026 13:11:41 +0000</pubDate>
      <link>https://dev.to/kale_myrk/git-worktrees-using-too-much-disk-space-copy-on-write-can-help-m34</link>
      <guid>https://dev.to/kale_myrk/git-worktrees-using-too-much-disk-space-copy-on-write-can-help-m34</guid>
      <description>&lt;p&gt;I've been using coding agents a lot lately, usually with several tasks going on in parallel. Each gets a Git worktree so I can leave things open without switching branches all day. It works well. Except my disk kept filling up.&lt;/p&gt;

&lt;p&gt;Every new worktree meant another checkout, and then there were the dependencies, generated files and build output. I started looking for a way to make those directories cheaper to keep around. I eventually wrote &lt;a href="https://github.com/myrk-kale/parhel" rel="noopener noreferrer"&gt;Parhel&lt;/a&gt;, a small Git extension in Rust that creates worktrees using copy-on-write (CoW).&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the disk space goes
&lt;/h2&gt;

&lt;p&gt;Git worktrees let you check out multiple branches of one repository into separate directories. I use them to keep a feature open while looking at something else, or to give different agents their own files to work on.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git worktree add &lt;span class="nt"&gt;-b&lt;/span&gt; feature/search ../my-app-search
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Git already shares the repository's object database and most of its metadata. So a worktree isn't a full second Git clone. But Git checks out the working files again, and a fresh worktree doesn't bring along ignored directories such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;node_modules/&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.venv/&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;target/&lt;/code&gt; in a Rust project&lt;/li&gt;
&lt;li&gt;Compiled assets, generated code, and local caches&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The usual next step is to install dependencies again or copy over the files you need. Do that across enough worktrees and the storage adds up. Package-manager caches help with part of it, but the generated output and other project files still need somewhere to live.&lt;/p&gt;

&lt;p&gt;If you're curious about exactly what Git shares, its &lt;a href="https://git-scm.com/docs/git-worktree" rel="noopener noreferrer"&gt;worktree documentation&lt;/a&gt; covers the layout.&lt;/p&gt;

&lt;h2&gt;
  
  
  How copy-on-write helps
&lt;/h2&gt;

&lt;p&gt;Say you have a large &lt;code&gt;node_modules/&lt;/code&gt; directory and a few hundred megabytes of compiled output. You want another worktree, preferably with all of that ready to use.&lt;/p&gt;

&lt;p&gt;Copying normally means writing all those bytes again. With CoW, the new files initially share data blocks with the originals. If you modify one of them, the filesystem allocates new blocks for what changed. You can edit the two copies independently; they just happen to share storage while their contents are the same.&lt;/p&gt;

&lt;p&gt;There's some overhead for metadata, and the savings shrink as files diverge. But if you're mainly creating worktrees and editing source code while dependencies and build output stay largely unchanged, that's a useful tradeoff.&lt;/p&gt;

&lt;p&gt;On Linux, the mechanism is commonly called a &lt;em&gt;reflink&lt;/em&gt;. The &lt;a href="https://man7.org/linux/man-pages/man2/ioctl_ficlone.2.html" rel="noopener noreferrer"&gt;&lt;code&gt;FICLONE&lt;/code&gt; documentation&lt;/a&gt; describes how separate files can share storage until a write requires a copy.&lt;/p&gt;

&lt;p&gt;You may not need anything beyond &lt;code&gt;git worktree add&lt;/code&gt;. If your worktrees are small, there's little to gain. A shared package cache can also reduce how much a dependency installation costs. I wanted to reuse the working directory as a whole, including ignored files that aren't managed by a package manager.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trying it with Parhel
&lt;/h2&gt;

&lt;p&gt;Parhel is a Git external command, so after installing it you use &lt;code&gt;git parhel&lt;/code&gt;. It creates an ordinary Git worktree from the directory you're working in, with CoW cloning wherever the filesystem allows it.&lt;/p&gt;

&lt;p&gt;It brings the ignored directories too. You can still use &lt;code&gt;git worktree list&lt;/code&gt;, &lt;code&gt;move&lt;/code&gt;, &lt;code&gt;lock&lt;/code&gt; and &lt;code&gt;remove&lt;/code&gt; afterward. Nothing about the Git side of the workflow changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Install
&lt;/h3&gt;

&lt;p&gt;On macOS with Homebrew:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;myrk-kale/tap/parhel
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or with Rust's package manager on macOS or Linux:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cargo &lt;span class="nb"&gt;install &lt;/span&gt;parhel
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Cargo installation requires Rust 1.85 or newer, and Parhel needs Git 2.29 or newer. There are also Linux &lt;code&gt;.deb&lt;/code&gt;, &lt;code&gt;.rpm&lt;/code&gt;, and release archives in the &lt;a href="https://github.com/myrk-kale/parhel#install" rel="noopener noreferrer"&gt;installation instructions&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Check that Git can find the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git parhel &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Create a worktree
&lt;/h3&gt;

&lt;p&gt;From your existing project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git parhel add ../my-app-search &lt;span class="nt"&gt;--new-branch&lt;/span&gt; feature/search
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Internally, Parhel registers a worktree with Git and clones the files from the source directory. The new worktree gets the dependencies and output that were already there, so in many projects you can just start working.&lt;/p&gt;

&lt;p&gt;By default, Parhel expects a clean source worktree. If you intentionally want to carry over uncommitted changes and other untracked files, use &lt;code&gt;--allow-dirty&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git parhel add ../my-app-experiment &lt;span class="nt"&gt;--new-branch&lt;/span&gt; experiment &lt;span class="nt"&gt;--allow-dirty&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Changes that were staged in the source arrive unstaged in the new worktree.&lt;/p&gt;

&lt;h3&gt;
  
  
  Check your filesystem
&lt;/h3&gt;

&lt;p&gt;On macOS, APFS already supports cloning. On Linux, Btrfs and XFS with reflink support can do it directly. ext4 needs a little more explanation.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;System&lt;/th&gt;
&lt;th&gt;How Parhel uses CoW&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;macOS on APFS&lt;/td&gt;
&lt;td&gt;Native filesystem cloning via &lt;code&gt;clonefile&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Linux on Btrfs&lt;/td&gt;
&lt;td&gt;Reflink cloning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Linux on XFS with reflink enabled&lt;/td&gt;
&lt;td&gt;Reflink cloning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Linux on ext4&lt;/td&gt;
&lt;td&gt;A one-time setup creates a separate Btrfs-backed CoW area&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;To check what Parhel can use on your machine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git parhel doctor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On Linux, the doctor command can tell you when the directory's filesystem doesn't support reflinks. XFS needs to have reflinks enabled when the filesystem was created.&lt;/p&gt;

&lt;h3&gt;
  
  
  Ext4 needs a separate CoW area
&lt;/h3&gt;

&lt;p&gt;ext4 doesn't support native reflinks. To make CoW work there, Parhel can create a Btrfs filesystem inside a sparse image and mount it as a separate area for your user. You set it up once:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;git parhel setup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This needs systemd, Btrfs support, and the tools listed in the &lt;a href="https://github.com/myrk-kale/parhel#filesystems-without-copy-on-write" rel="noopener noreferrer"&gt;Parhel documentation&lt;/a&gt;. It also makes system-level changes, so I recommend reading that part before running the command.&lt;/p&gt;

&lt;p&gt;The first run copies the source into the Btrfs area as a baseline. That initial copy takes time and uses real space. Later worktrees share unchanged blocks with that baseline, and the path you asked for becomes a symlink to the worktree inside the store. ext4 itself hasn't gained CoW support; the sharing happens inside Btrfs.&lt;/p&gt;

&lt;p&gt;You can also use &lt;code&gt;--copy&lt;/code&gt; to make a full copy on any filesystem, or &lt;code&gt;--fallback&lt;/code&gt; to use a regular Git worktree without copying the ignored files. Neither option saves disk space through CoW, but both work without setting up the store.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I measured
&lt;/h2&gt;

&lt;p&gt;I ran a benchmark on macOS with 78 MB of &lt;code&gt;node_modules&lt;/code&gt; (about 20,000 files) and a 300 MB generated artifact. I compared getting a regular worktree ready by copying the ignored files over with creating one through Parhel.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Creating a ready-to-use worktree&lt;/th&gt;
&lt;th&gt;Time&lt;/th&gt;
&lt;th&gt;Additional disk space&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;git worktree add&lt;/code&gt;, followed by &lt;code&gt;cp -R&lt;/code&gt; for dependencies and output&lt;/td&gt;
&lt;td&gt;6.9 s&lt;/td&gt;
&lt;td&gt;383 MiB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git parhel add&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;0.5 s&lt;/td&gt;
&lt;td&gt;About 8 MiB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The difference was pretty striking in that project. A plain &lt;code&gt;git worktree add&lt;/code&gt; wouldn't copy the ignored directories in the first place, so the baseline includes &lt;code&gt;cp -R&lt;/code&gt; to get both worktrees ready with the same files. You can find the details in the &lt;a href="https://github.com/myrk-kale/parhel#readme" rel="noopener noreferrer"&gt;README&lt;/a&gt;; your results will depend on the files and filesystem involved.&lt;/p&gt;

&lt;h3&gt;
  
  
  A note about &lt;code&gt;du&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;One thing that can be misleading: Finder and &lt;code&gt;du -sh&lt;/code&gt; may report the full size of both directories after cloning. The files have their own logical sizes even when they're sharing blocks on disk.&lt;/p&gt;

&lt;p&gt;I check how much free space changed before and after creating a worktree:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;span class="c"&gt;# Create a worktree on the same filesystem.&lt;/span&gt;
&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On ext4, remember to check the filesystem backing the store too. The initial baseline is a real copy, and the destination path points into the mounted Btrfs area.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where you still need to be careful
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;.env&lt;/code&gt; files and external services
&lt;/h3&gt;

&lt;p&gt;Parhel copies ignored files, which can include local credentials and &lt;code&gt;.env&lt;/code&gt; files. If two worktrees contain the same database URL, they'll connect to the same database. A migration from one worktree can affect the other. That's worth thinking about before giving several agents their own working directories.&lt;/p&gt;

&lt;p&gt;If a file needs different values per worktree, exclude it with &lt;code&gt;.parhelignore&lt;/code&gt; and create a separate configuration in the destination:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.env
.env.*
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;.parhelignore&lt;/code&gt; uses Gitignore-style patterns and applies to untracked files Parhel would otherwise carry over. Git still controls tracked files.&lt;/p&gt;

&lt;h3&gt;
  
  
  Paths inside virtual environments
&lt;/h3&gt;

&lt;p&gt;A Python virtual environment can contain scripts pointing to the directory where it was created. Symlinks and generated configuration from other tools can have the same problem.&lt;/p&gt;

&lt;p&gt;Parhel rewrites source paths in untracked text files where it can and adjusts relevant symlinks. It leaves binary files alone because patching an embedded path could corrupt them. Some Conda environments, for example, are better left out through &lt;code&gt;.parhelignore&lt;/code&gt; and rebuilt when needed.&lt;/p&gt;

&lt;p&gt;The mechanism is generic. Parhel doesn't need to know whether a directory belongs to Python, Node.js, or another tool.&lt;/p&gt;

&lt;h3&gt;
  
  
  Removing a worktree
&lt;/h3&gt;

&lt;p&gt;Git doesn't ask about ignored files when removing a worktree. If you had a local database or generated results in there, those can disappear along with it.&lt;/p&gt;

&lt;p&gt;I recommend checking first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git &lt;span class="nt"&gt;-C&lt;/span&gt; ../my-app-search status &lt;span class="nt"&gt;--ignored&lt;/span&gt; &lt;span class="nt"&gt;--short&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a normal CoW worktree, removal is the usual Git command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git worktree remove ../my-app-search
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Worktrees in the ext4-backed store are locked so Git won't forget them when the mount is unavailable. To remove one of those:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git worktree unlock ../my-app-search
git worktree remove ../my-app-search
git parhel doctor &lt;span class="nt"&gt;--fix&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are other edge cases, including sparse checkouts and submodules, covered in the &lt;a href="https://github.com/myrk-kale/parhel#limitations" rel="noopener noreferrer"&gt;README&lt;/a&gt;. I'd read those before using it on a repository you can't afford to disrupt.&lt;/p&gt;

&lt;h2&gt;
  
  
  I mostly use it with coding agents
&lt;/h2&gt;

&lt;p&gt;The reason I started this was the number of parallel tasks I keep open with coding agents. I wanted to create another worktree and let an agent get on with its task without waiting for me to rebuild the environment.&lt;/p&gt;

&lt;p&gt;Parhel works without an agent. If you use one, there's an optional skill in the repository that teaches it when to use Parhel and which details to check before copying or removing files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add myrk-kale/parhel
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can install it globally with &lt;code&gt;-g&lt;/code&gt; as well. The skill covers things like &lt;code&gt;.env&lt;/code&gt; files and ignored content, which are easy to overlook when you're moving quickly.&lt;/p&gt;

&lt;p&gt;I've kept Parhel focused on worktree creation. It doesn't replace the Git workflow I already have, and it should be just as useful if you don't use coding agents at all.&lt;/p&gt;

&lt;p&gt;It's still a 0.x project. There are more than 430 tests covering Git operations and real filesystem behavior, but I'm sure there are setups I haven't seen yet. I've documented the &lt;a href="https://github.com/myrk-kale/parhel/blob/main/docs/test-catalog.md" rel="noopener noreferrer"&gt;tests&lt;/a&gt;, filesystem implementation, and known &lt;a href="https://github.com/myrk-kale/parhel#limitations" rel="noopener noreferrer"&gt;limitations&lt;/a&gt; in the &lt;a href="https://github.com/myrk-kale/parhel" rel="noopener noreferrer"&gt;repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you've been dealing with the same disk space problem, I'd be interested to hear how you've handled it, especially if your worktrees have something Parhel won't copy safely.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>git</category>
      <category>claude</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
