hutch: code reviews for the mildly disenfranchised

Akshay Gupta (he/him) - Pronunciation: "UCK-shay", IRC: kitallis, Bluesky: repartee.party Homepage: https://kitallis.in, mail@kitallis.in

The following image shows where the talk is in the schedule for Sun 2026-12-13. Solid lines show talks with Q&A via BigBlueButton. Dashed lines show talks with Q&A via IRC or Etherpad.

Schedule for SundaySundaySun 9:00- 9:10 Sunday opening remarkssun-openSun 9:10- 9:20 BONE and gnaw.el: tracking what mattersboneSun 9:35- 9:50 Local file history possibilities in EmacslocalSun 10:05-10:20 hutch: code reviews for the mildly disenfranchisedhutchSun 10:30-11:15 Team-oriented AI-activity: Beyond the chatbot -- Towards convivial AI workflow frameworksteamSun 11:25-11:45 Beyond shell history: Saving compilation output in EmacscompileSun 1:00- 1:20 DnD and Org Roam: Becoming a Better DM with EmacsdndSun 1:30- 1:55 Bible-gateway: A Two-Edged Sword in EmacsbibleSun 2:15- 2:35 Ghost in the Shell: a libghostty powered terminal for EmacsghostelSun 2:55- 3:15 Column-aligning text in EmacsalignSun 3:35- 3:55 Revisiting Emacs Mouse Interactions with AnjuanjuSun 4:05- 4:25 Emacs on Android - Emacs for the next 40 yearsandroidSun 4:45- 4:55 Sunday closing remarkssun-closeSun 9:10- 9:40 Canvas: A new foundation for graphics in EmacscanvasSun 10:00-10:21 prefix-tab-groupsprefixSun 10:30-10:50 Emacs as a Window Manager and concurrencyrauSun 11:10-11:30 El-gpu and pix-el: GNU Emacs 2D and 3D game programmingel-gpuSun 1:00- 2:00 [Panel] Emacs, LLMs, and Free SoftwarellmsSun 2:20- 2:40 A (sort of) REPL for learning SVGsvgSun 2:50- 3:05 Org Babel everywherebabelSun 3:25- 3:45 Learning an ancient language with an ancient text editorancientSun 4:05- 4:25 It's Probably Not a VirusvirusSun 9:10- 4:45 Sunday hallway / open micsun-hallway9 AM EST10 AM EST11 AM EST12 PM EST1 PM EST2 PM EST3 PM EST4 PM EST5 PM EST

Format: 12-min talk ; Q&A: Etherpad https://pad.emacsconf.org/2026-hutch
Etherpad: https://pad.emacsconf.org/2026-hutch
Discuss on IRC: #emacsconf-gen
Status: Ready to stream

Times in different time zones:
Sunday, Dec 13 2026, ~10:05 AM - 10:20 AM EST (US/Eastern)
which is the same as:
Sunday, Dec 13 2026, ~9:05 AM - 9:20 AM CST (US/Central)
Sunday, Dec 13 2026, ~8:05 AM - 8:20 AM MST (US/Mountain)
Sunday, Dec 13 2026, ~7:05 AM - 7:20 AM PST (US/Pacific)
Sunday, Dec 13 2026, ~3:05 PM - 3:20 PM UTC
Sunday, Dec 13 2026, ~4:05 PM - 4:20 PM CET (Europe/Paris)
Sunday, Dec 13 2026, ~5:05 PM - 5:20 PM EET (Europe/Athens)
Sunday, Dec 13 2026, ~8:35 PM - 8:50 PM IST (Asia/Kolkata)
Sunday, Dec 13 2026, ~11:05 PM - 11:20 PM +08 (Asia/Singapore)
Monday, Dec 14 2026, ~12:05 AM - 12:20 AM JST (Asia/Tokyo)
Find out how to watch and participate
You can watch this talk now, ahead of the conference. It will also play on the stream at the scheduled time, but this way, you can start checking out the ideas and then come to the Q&A time with more questions. Q&A will be right after the talk's time on the schedule. This talk's Q&A will start at around 2026-12-13 10:17 AM UTC-0500. It will be on the stream until the next talk starts, but people can continue asking questions and discussing ideas even after the stream moves on to the next talk. Enjoy!

00:00.071 Introduction 02:14.825 Typical coding agent review 03:28.261 Hutch 04:19.220 Tools 04:51.291 Report 05:14.317 Comments 05:37.385 Additional reviews 06:13.194 Storing review notes 07:03.876 Formal eval and Perfetto 07:38.342 Tracing performance with Perfetto 09:32.417 SQL queries 09:55.100 Model comparison 11:09.356 Summary

Duration: 11:45 minutes

Description

(Alternatively, skip this description and read the short essay on hutch: https://kitallis.in/p/hutch-a-local-code-review-interface-for-magit)

We're here today, roughly 500 days https://en.wikipedia.org/wiki/List_of_large_language_models#2025 in, and coding agents are genuinely more productive than, previously, instructed https://www.youtube.com/watch?v=U_cSLPv34xk. They are now driving much of our daily work, helping us organize, process information and be more useful overall, and, with this brainwave of an opening, I present yet another attempt at wedging large languages, agents, coding harnesses etcetera inside our beloved buffers, or something.

But hopefully, an unseemly angle to consider, first.

I continue to hand-write and often, hand-commit code. I prefer the learning aspect of AI more than the task completing automaton aspects. The latter has driven all sorts of explosion of tooling around not just writing, but reviewing code too. Like review agents jumping in, before your colleagues do, and dumping logorrhea across twenty pull requests before you have had a chance to wake up and look at your phone. This works, sometimes, for some people. But if you're like me, you still have people looking at code before it is deployed to users, and for that, it's overall better if you respect those people and their time.

This is where hutch slides in.

hutch https://github.com/adjaecent/magit-hutch is a Magit-induced, buffer-local interface over LLM review output. Instead of the review living on code-forges as comments for everyone to see, it appears patch-shaped (usually) within Magit's transient blocks and can be triaged and applied directly within emacs, before you commit and push.

Here's an example workflow:

Imagine you've just finished implementing a function. Before committing, you ask hutch to review the diff through the Magit buffer. You get a new actionable buffer back:

src/infirmary.rb
@@ ...
- def eligible?(user) = user.age >= 18 && user.age < 18
+ def eligible?(user) = user.age >= 18 && user.age < 65

[hutch] This condition can literally never be true
[hutch] Did you mean `user.age < 65`?
[hutch] apply suggestion? [y]es [n]o [e]dit

You can now accept, reject, or investigate each suggestion without leaving the Magit workflow. If the suggestions are useful, hutch can turn them into patches and apply; if it's nonsense, you dismiss it right there. None of it leaves your safe space.

The talk walks through how it works and when it doesn't:

  • tour of the workflow: how to use hutch, when to use hutch, how to approve and reject things
  • patches over comments: hutch biasing outputs towards actionable items, rather than just prose
  • tools: guardrails, every agent loop earning its keep, gptel's state-machine
  • evals: how does it stack up against other external tooling on recognized benchmarks
  • dead-on-arrival: where it fails and why this is only useful if you work in a specific niche way

This is a Magit and review-workflow talk that happens to involve an LLM, it doesn't purport any arguments about whether you should or shouldn't use AI with emacs.

Note: The hutch package is available on MELPA https://melpa.org/#/hutch.

About the speaker:

Modern day aesthetically-relevant hacker. Long-time Clojure and Ruby programmer, reluctant polyglot by way of building high-throughput backends. Recently wound-down my startup Tramline, a mobile release orchestration tool, now kept alive as open source. Emacs and Magit are my daily drivers.

Transcript

[00:00:00.071] Introduction
[00:00:00.071] I'm Akshay. I'm going to talk about a local code review tool I've been building for Emacs for the past five months or so. I've previously been an Emacs user for about 10 years, and I use it as a daily driver for most of my code and prose editing. When I say a local review tool, I mean local to Emacs and not necessarily local LLMs on device, even though I think that's theoretically possible today. By code reviews, I specifically mean the thing we do on pull requests and on tools like Gerrit and Phabricator in the past. In other words, a system for gating code before it's merged to be released. I should say that there have been many good talks about LLMs in AI and what that means for Emacs, so I'm not going to relitigate any of those arguments again. I approach this, as many others in the community, by letting go of semantic boundaries under which Emacs is considered an editor, but just rather a mutable productivity environment instead. But I do want to briefly show you my experience with existing code review tools that are around because I have a bit of a love-hate relationship with them. It can be pretty overwhelming to keep up with the speed at which the amount of code gets produced daily these days, especially if you work in a team, but also the amount of review text that now gets attached to that code. In my experience, even though the noise to signal for these tools worst case is like 10 to 1, I don't feel like we can get rid of them entirely because those ones can sometimes be pretty sharp and important. But I do think there's value in sort of shifting the process to the left to borrow a term from the DevRel industry. Because it's useful to see the work you did before you create more work for others, for your colleagues and your peers. Many of these flows can now be easily unlocked in Emacs given the excellent building blocks we have today.
[00:02:14.825] Typical coding agent review
[00:02:14.825] But before I walk you through how a Hutch workflow works, I want to show you what a typical coding agent review looks like today. These examples are from a real open source product that I've been building for the past three years. This is one pull request from the project. It's a single review pass by a review agent. Has 23 comments. Every single one of them flagged as a potential issue. Five of them are marked critical. This is technically a review and it's probably a decent one. But it's also a bit of a DOS attack on my attention. If we look behind the scenes on one of those critical flags, it ran 40-something shell scripts. It ran web searches. It wrote a little prompt for another AI to go and fix the thing. All of it to tell me that one method was undefined and would crash at runtime. But at the end of all of it, it was still incorrect. The method comes from a Ruby gem, and this was simply my reply in six words, which to its credit it apologized and updated its memory for. This is not a one-off thing.
[00:03:28.261] So I built Hutch for myself. It's up here. It lives in Emacs and on top of Magit. You decide when you want to trigger it and any obvious to relatively bigger issues get caught up front before you push your code up. When it does have something to say, it's usually a full-size diff you can directly apply. But even if it doesn't, it's prose for you to read and not five other people collectively. So here's how you kick it off. When you're ready to commit, you open up the change diffs in Magit, you stage your changes as usual, and then select the hutch action and trigger a new review. Once this is done, you'll see a new hutch buffer show up. I also have a debug log buffer that can be optionally enabled.
[00:04:19.220] Hutch tools
[00:04:19.220] This review has been run on the Hutch codebase itself and the agent is sifting through the code and you can see a bunch of tools being called like read_file and search_codebase and stuff. There's around five tools that Hutch exposes, one of which is called surrounding_context that uses TreeSitter if you have that installed to increasingly fetch more context around certain suspicious lines without needing to read whole files and waste tokens. You'll see that it took around five rounds to finish this review this time.
[00:04:51.291] Hutch walkthrough
[00:04:51.291] Once the Hutch buffer is ready, you'd see something like this. It'll report the total tokens at the top. You'll see the findings organized under suggestions, comments, and LGTM (which is "looks good to me"). Just like Magit, you can open the submenus up. If you agree with the suggestion and the attached patch, you can hit m to queue it up.
[00:05:14.317] Applying suggestions
[00:05:14.317] Comments are just text for you to read and determine if they make sense. These can also be copied and sent off to someone else to take a look or another agent that you might have running. Once all the suggestions are queued up, you can apply them all with the key binding A and the patches get applied to the staged files directly, bottom-up.
[00:05:37.385] Additional reviews
[00:05:37.385] But perhaps at this point, I'm not convinced yet. I'd like to run another review on these corrected changes, and I can do so. So here we get another suggestion to fix that wasn't caught the last time. We queue it up, apply it, and verify that it's lodged in, and then run one more final review before we commit. So at this point, I'm happy with the changes. The comments are not actionable, so I go ahead and write my commit.
[00:06:13.194] Storing review notes
[00:06:13.194] Another useful thing you can enable as a post-commit hook is having your review notes be stored within Git as a separate ref. In the terminal pane on the right, you can see our last review was durably kept for posterity. This can be useful for maintaining a related history of reviews along with your commits and for sharing the reviews with your team as well. That's it. It's hopefully pretty simple and intuitive to get started with. There's a lot more things to configure that you can find in the README. If you're the kind that never wants to go back to writing code in editors by hand again, but are still the kind that enjoys programming on their own projects, this might be a nice thin layer to get your work verified without over-relying on LLMs for everything.
[00:07:03.876] Formal eval and Perfetto
[00:07:03.876] On a separate note, Hutch does have a formal eval pipeline. If you set hutch-trace-dir and give it a path, it can emit Perfetto traces that can then be piped into some of the eval scripts that we have to get fresh data about agent quality. We can also use the traces to visualize the agent itself. They're useful for both post runtime observability and to fetch data for verifying its correctness.
[00:07:38.342] Tracing performance with Perfetto
[00:07:38.342] Perfetto is an open source performance tracing tool that comes with a bundled SQL query engine as well. You see this typically being used in Android and on Chrome for performance profiling and things. But it turns out it works pretty well as a simple agent tracing tool because it's entirely infrastructure-free. You just emit JSON in its own trace format and you can load it up on ui.perfetto.dev. So once you load it up, this is what the visualization looks like. There's a timeline of what the agent did, what tools it called, the slices of LLM calls, and down below the tokens that were consumed. We can zoom into one of these tool calls and we can check out what all the agent did. So here we see a search_codebase tool call with that search string and it looks like it took about 400 milliseconds to finish. If we move further along, we'll see another search_codebase call being called with slightly different arguments. It took a little longer to finish. As you can see, as we move along the trace, the number of tokens consumed are increasing over time. If we go all the way to the end, we'll see two markers. The first one is where the LLM calls end. This is where the agent is done with all its findings. At this point, no models are being called and everything that we got back is being now processed by Hutch. A few milliseconds later, we see the final findings that are eventually rendered onto the Hutch buffer. These are verified and are sanitized for correctness.
[00:09:32.417] Perfetto SQL queries
[00:09:32.417] You can also run SQL queries on Perfetto. Here we have a very simple query to fetch all the tool call durations. Here we can see the search_codebase tool call seems to have taken the most amount of time in this particular trace. read_file seems to have been called the most.
[00:09:55.100] Comparison of model findings
[00:09:55.100] Before I wrap this section up, I wanted to share a couple of quick findings from slightly older models run on Martian's code review dataset of 40 PRs across different difficulty levels. You can find more detailed benchmarks and eval runs in the README if anyone's curious. This first graph shows that different models tend to find different issues. So not all of them necessarily agree on what a real bug is. But if you theoretically combine their results, you would get about a 50% jump in the bug hit rate. The second graph shows how many rounds each model took to grind through the dataset.
[00:10:36.697] Rounds vs. token cost
[00:10:36.697] Here, GPT takes many more rounds and Opus is far fewer. But rounds can be misleading because they don't track cost. Opus finishes in the fewest rounds but burns the most input tokens by far, likely because of the growing conversation context. GLM does it in under 2 million. So on the axis that actually costs money, GLM is the cheapest of the three, which is the reason why it's my default model of choice. That's it from me for today.
[00:11:09.356] Rich Hickey wrote a post recently arguing that LLMs aren't tools, they're automation. They do the work and they take the thinking with it. Hutch is my attempt at keeping as much of this process under your control as possible. You choose when to run it, you read what it says, and then you apply the fixes yourself. It's a small local "tool-enough" for people still reading what they write, and it's available to download on MELPA and on GitHub.

Captioner: sachac

Questions or comments? Please e-mail mail@kitallis.in