Show HN: Git for AI Agents

(github.com)

113 points | by doshay a day ago ago

62 comments

  • Zambyte a day ago ago

    People in this thread seem to be too focused on the agent creating a git log. This seems to be solving a different problem than that does.

    When you're interacting with agents, multiple prompts may reasonable culminate in a single commit. It may be useful to track or undo things between commits - at the prompt level. I personally have a workflow when I use Jujutsu (jj) for git already, and this slotted in very nicely to solve this problem. The auto-committing in jj makes it very easy and natural to compare diffs between prompts, and undo specific chunks or restore previous states without making a new commit every prompt. I only finish a commit, giving it a message and advancing the branch, once I've iteratively dialed in the changes I want.

    I probably won't use this tool since I already have a flow that works for me, but maybe this will help people see why such a tool can be helpful.

    Edit: fixed typo

    • doshay 5 hours ago ago

      tnx for the honest feedback! really, appreciate it! would you mine sharing more details about your workflow with jj?

      • Zambyte 5 hours ago ago

        Sure. I was a bit loose with my vocab in my previous comment - I'm going to try to be more specific by using the terms as defined in the jj glossary[0] (particularly "change" vs "commit").

          - I start by using jj new to create a new change where I want to start working.
          - I open codex, and prompt it to do something.
          - Roughly every prompt, I will naturally check the cumulative diff using jj diff.
          - If I want to check the diff log of the working change, I'll use jj evolog.
          - If I want to check the diff from the previous prompt, I'll use jj diff -f xx/1, where xx is the short change ID for the working change, and 1 is how many prompts ago I want to look at the diff for (jj evolog can help with finding the change I'm interested in)
          - If I want to undo all or some of what a prompt did, I'll use jj restore -f xx/1, potentially with -i or a fileset.
          - When I've prompted / restored / made changes myself to the point where I am happy with a change, I'll usually ask codex to write a conventional commit message for <commit_id>. Codex will then use *git* to look at the diff in that commit (which has no commit message), and give it will usually give an appropriate commit message[1] (sometimes I'll tweak this if there are details I want to add or remove). I use jj ci (short for jj commit) to finish the change and add the commit message.
          - I'll then advance bookmarks as necessary with jj b m (short for jj bookmark move) and probably push.
        
        [0] https://www.jj-vcs.dev/v0.41.0/glossary/

        [1] https://www.conventionalcommits.org/en/v1.0.0/

        • doshay 3 hours ago ago

          cool approach, i havent used jj actually in my workflow, ill try to adopt

    • empath75 a day ago ago

      That's actually the one feature of cursor that i really miss in claude, even though I need it a lot less often.

      • adastra22 8 hours ago ago

        Hit ESC-ESC in the Claude Code terminal.

        • doshay 5 hours ago ago

          - hopefully after a /compact. - what happens if want to undo, and then redo? i found the /rewind functionality in claude very lean in that matter.

  • clutter55561 a day ago ago

    I think this is very interesting but you need a better slogan.

    Many people here made comments such as “why do I need another SVC since agents are pretty good with git”, which means they barely read your blurb and did not understand your project.

    • doshay 5 hours ago ago

      absolutely right, i got this feedback from many people actually ...

    • infecto a day ago ago

      Agree. The slogan or header should what is in the first sentence. “Version Control for AI agent activity”

    • flowardnut a day ago ago

      maybe the intro sentence needs changed then. if your elevator pitch is losing the room, change the pitch.

  • tfrancisl a day ago ago

    Just use git. If your agent (especially claude) doesnt seem to know how, there are skills and hooks and other options to make it work. My 2c.

    • cyclopeanutopia a day ago ago

      Just read before posting. My 2c.

    • bob1029 a day ago ago

      I have found that git.exe outperforms any other codebase representation with GPT5.x once you figure out how to not mangle the arguments. Commands like grep and log can replace a lot of other tools if you can use them reliably.

    • ozim a day ago ago

      Exactly like I didn’t do anything super important - but I just tell agent “commit after successful build.

      I think it would work with “commit before you want to delete stuff” the same way.

  • lifis a day ago ago

    This seems easily solved with a tool use hook that calls git add .; git commit a -m "<tool description>", specifying an alternate .git directory if desired

    • doshay 5 hours ago ago

      but then you would have to commit each tool and action of the agents, which is polluting the git history and also huge overhead (at least imo)

  • hombre_fatal a day ago ago

    Everything but trivial changes should go through a prompt -> plan -> impl phase where you revise a concrete plan file until it's ready for impl.

    Now impl is just a derivation of the plan, and the plan gets checked in with the same commit so that you can see the why, the intent, the objective, the research that informed the decisions.

    Much simpler, and a much, much more effective process than prompt -> impl.

  • j-pb a day ago ago

    Very cool approach! We build something super similar, also going for content addressed storage and compare&swap as fundamental primitives.

    Also commit dag based, but we also wrote this whole knowledge graph / triple-store CRDT data format on top.[1]

    We also have p2p syncing of the history so you can use it to track your local work but also to have your agents coordinate within your team.

    We had our agents build their own tools on top of that substrate, that way we're vendor independent, this stuff works everywhere from claude web, to self hosted openclaw, you only need to tell your agent to use the faculties.

    Because the substrate takes care of everything, every new faculty you write on top of that inherits all of the same properties.

    1: https://github.com/triblespace/triblespace-rs

    2: https://github.com/triblespace/faculties

    • doshay 5 hours ago ago

      super nice, indeed similar approach

  • bel8 a day ago ago

    I found LLMs to be really smart with command-line git.

    This week I told DeepSeek v4 Flash (max variant) to scavenge for all changes and additions of a specific feature of the project and build a report of the feature timeline with example code and rationale behind the changes.

    It fired a ton of read-only git commands (isolated inside Docker) and came up with a neat markdown report of the feature from inception to current state.

    If DS4 Flash can do it, for SOTA LLMs like GPT 5.5 and Opus it should be a walk in the park.

    That said I don't let LLMs commit. I like to take a close look at every change before committing. Early changes are cheaper.

    • doshay 5 hours ago ago

      exactly, imo - the llm should touch git only after explicit approval or after specific set of guardrails. this one of the reasons i built it actually, i think the agent workflow should be decoupled from git, until saving the code

  • sudb a day ago ago

    I think the idea of tracking intent in git commits is a great idea but it feels to me like this might be reducible to some prompts/extending git/pre-commit hooks?

  • dimgl a day ago ago

    Hey, that's cool. Does this support conversation lookups? Like, "find this conversation we talked about yesterday"? I built a similar tool to this, although Regent seems much more elegant: https://github.com/divmgl/clancey/

    • doshay 5 hours ago ago

      cool!

      actually not at the moment - would be nice to add it. i think the core of re_gent allows it very naturally, feel free to push it if want :)

  • embedding-shape a day ago ago

    Agents can use git FWIW, and you can tell them to search old sessions by saying "Search through sessions in ~/.codex/sessions" and it'll find the most appropriate tools for doing so that is installed already. You can even add this to your system prompt or AGENTS.md and now you don't even have to prompt for it, it'll just look up the session history by itself.

    Why this isn't built-in, I dunno, but been possible and easy for a very long time already, and works for any agent harness out there (as long as they persist sessions that is).

    Personally I make the agent justify and explain things in the git commits, where is where that info went before agents anyways too, then have some sentences in my AGENTS.md about reading recent commits before doing changes, and using it whenever I prompt for history that isn't part of the current session. Seems to work perfectly fine.

    • cosimo-dw a day ago ago

      I think codex has done something along the line: https://github.com/openai/codex/pull/6041

      But it is trying to use git as a backend to save file states, and at the same time NOT showing it in the user's git history.

    • _ink_ a day ago ago

      I haven't tried it, but conceptually I can imagine that it is good to have a separate VCS for the agent. This way I can keep git clean and easy to understand for humans and still keep all the verbosity the agent needs.

      • embedding-shape a day ago ago

        > This way I can keep git clean and easy to understand for humans

        Personally I like it best when both humans and agents find it clean and easy to understand, but we all like different things :)

      • tfrancisl a day ago ago

        Branches and worktrees exist and can effectively act as a "separate" history. At the end of the day you would still merge the changes in, possibly with a squash if you don't care about the little commits.

      • esafak a day ago ago
      • giraffe_lady a day ago ago

        It's really not. Anything the LLM can benefit from people can too. Keeping minimal explicit information in git history is a cultural norm not proven best practice. The best codebases I've worked on have very large commit messages and searching them is very useful. We should have been doing it that way all along.

  • c7b 16 hours ago ago

    Great idea! I was really baffled when I found out that that's not how agents, or also Chat-based IDEs like Cursor, work by default (guess how).

  • binyu a day ago ago

    Hey, this is cool work. By any chance, did you see Cloudflare Artifacts?

    https://blog.cloudflare.com/artifacts-git-for-agents-beta/

  • deferredgrant a day ago ago

    Small recommendation: Speed up the demo on the Github page. That would reduce the number of folks that drop off the page waiting for the command-line typing.

    • doshay 5 hours ago ago

      thanks! will do

  • Cilvic a day ago ago

    quite interested in this but I'm working pi/omp only at the moment.

    Inspired by entire.io I've vibed a super small extension that seems similar to this: https://github.com/janmechtel/pintire

    I expect this feature to eventually end up in the harness

  • esafak a day ago ago

    1. Tests look anemic: https://github.com/regent-vcs/re_gent/tree/main/test

    2. How does it compare with http://usegitai.com/ and https://entire.io/ ? Another Show HN: https://news.ycombinator.com/item?id=48057104

    3. Please add it to other registries, esp. those compatible with mise, e.g., https://github.com/aquaproj/aqua-registry

  • radial_symmetry a day ago ago

    This is brilliant. Does it only work with Claude right now? Will it work with any agent built on the Claude Agent SDK?

    • doshay 5 hours ago ago

      at the moment only Claude Code, i'm planning to add support for the other big 3, but at the moment it's just me ... hopefully in the near future :)

  • shcheklein a day ago ago

    just curious since it reminds me a bit. Have you / someone tried https://entire.io/ (I'm not affiliated at all, so it is not a plug).

    • doshay 5 hours ago ago

      sure, fair question i think the main difference is that entire are built on top of git == you would have to commit in order to track something...

  • transkey a day ago ago

    That's a good idea. I think you should develop it to make it more versatile.

  • keybored a day ago ago

    None of these X-for-agents seem to motivate why they don’t use X.

    • tfrancisl a day ago ago

      Git is a particularly egregious one, imo. It has a simple cli and solves all of the problems presented here! Worktrees for "exploratory" work that you might throwaway, and otherwise atomic commits just make tracking changes and reasoning for changes easy.

  • alansaber a day ago ago

    I am all for extremely granular control of agents. Good work.

  • grim_io a day ago ago

    What's git for AI agents? git. What's a browser for AI agents? a browser. What's a Flux Capacitor for AI agents? a Flux Capacitor. You get the point.

  • throwatdem12311 a day ago ago

    can’t you just make agent hooks that do this with plain git?

    • doshay 5 hours ago ago

      that's exactly what i tried in the first place, but i think it would be misuse of git protocol, git is built for files - the blobs/ tree calc & mechanism , for large contexts and linear thinking flow it's differnt, but honestly - i think you can get to a very good solution with pure git..

  • Abhijeet620380 a day ago ago

    Nice project. The interface feels clean and fast.

  • boombapoom a day ago ago

    my agent rebased and forcepushed with conflicts...

  • User23 17 hours ago ago

    I'm really pleased how wildly all the other commenters are misunderstanding this.

    I was counting on this concept as competitive advantage.

    But since the algorithm isn't going to surface me anyhow, for giggles I'll say I'm leaning more toward darcs than git.

  • wxw a day ago ago

    Fun idea! There's frankly a lot to learn from reviewing agent sessions.

  • kolinko a day ago ago

    hm, I can’t find the link?

  • _blk a day ago ago

    Cool idea. Time will tell how it matures. It doesn't look trivial. Definitely should beat my current "scan the history" approach. Couple questions arose while reading the README:

    - Would it integrate with rtk? Rtk is a token saver that shortens native output of got (and other) commands. - Does it track feature branches? - Is there garbage collection when history is rewriting (rebase before PR or removal of credential files.. ) or "simplification" of data as it gets older (Claude session logs lost...)?

    Wishing you all the best with the project.

  • boombapoom a day ago ago

    I think of git more like a defense and quality control against AI slop than something that should be automated

  • llmslave a day ago ago

    unfortunately, agents have decades of examples for how to use git, bearish on any tool that deviates from git

    • doshay 5 hours ago ago

      i think you misunderstood the concept, actually . it's not built to replace git, rather to sit on top of it.

  • dominotw a day ago ago

    every show hn now is now

    cool but look at myproject.com

    • skeeter2020 a day ago ago

      it's more like:

      This is a great idea! / Cool approach / This looks amazing ... We / I did something similar ... <steal attention>

      Bonus points if it looks like an AI generated response for an AI coded project.