---
title: "Discussion on \"My coding agent's memory hit 22 GB in git. The bug? One line per message.\" | Hashnode"
description: "Discussion on \"My coding agent's memory hit 22 GB in git. The bug? One line per message.\". So I build this tool called Roam. It saves my coding agent sessions (OpenCode, Claude Code, Codex, whatever I'm using that day) into a private git repo, so when I switch from my PC to my laptop I can"
url: "https://hashnode.com/posts/my-coding-agent-s-memory-hit-22-gb-in-git-the-bug-one-line-per-message/6b02ade35ff246a733445b71"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [My coding agent's memory hit 22 GB in git. The bug? One line per message.](https://deepxdcode.hashnode.dev/my-coding-agent-s-memory-hit-22-gb-in-git-the-bug-one-line-per-message?utm_source=hashnode&utm_medium=feed)

So I build this tool called Roam. It saves my coding agent sessions (OpenCode, Claude Code, Codex, whatever I'm using that day) into a private git repo, so when I switch from my PC to my laptop I can

2d ago · 5 min read · deepxdcode.hashnode.dev  
Read the article

-   [#git](https://hashnode.com/tag/git)
-   [#ai](https://hashnode.com/tag/ai)
-   [#ai-agents](https://hashnode.com/tag/ai-agents)
-   [#developer-tools](https://hashnode.com/tag/developer-tools)

## Written by

[Avradeep Majumder](https://hashnode.com/@deepxdcode)

@deepxdcode · India

  
[View profile](https://hashnode.com/@deepxdcode)

Building Roam: coding agents that pick up where you left off on any machine

Final-year AI/ML student in India. I build Roam: it lets coding agents pick up where you left off on another machine, search every past session, and leave each other notes, all through your own private git repo.

## Responses 5

Markdown supported · ⌘↵ to post

[Salman Parvez | ML Systems](https://hashnode.com/@ml-systems)

[1d ago](https://hashnode.com/posts/my-coding-agent-s-memory-hit-22-gb-in-git-the-bug-one-line-per-message/6b02ade35ff246a733445b71/comment/6b030e2d4bd8a5f8801cb00a)

"Saved has to mean pushed" is the lesson I'd frame. A status that reports the local step and not the outcome is how a problem runs for two days with nobody knowing. I come from construction estimating, and the "of 57" heading is a familiar trap: stamp a running total on every sheet and every sheet gets reissued when one line changes. Number the item once and keep the total on a cover page. Good on you for retiring the milliseconds claim after measuring 47 seconds, too. Every figure coming from a script anyone can run is the right standard.

[Avradeep Majumder](https://hashnode.com/@deepxdcode)

[1d ago](https://hashnode.com/posts/my-coding-agent-s-memory-hit-22-gb-in-git-the-bug-one-line-per-message/6b02ade35ff246a733445b71/comment/6b030e2d4bd8a5f8801cb00a#reply-6b0312b27ee8a69062dee5cd)

Thanks Salman — the construction-estimating parallel is exactly it: stamp a running total on every sheet and the whole set gets reissued when one line changes. That is why I moved to immutable per-chunk files and keep the running count on the head note only. And yes, the status now separates "saved locally" from "pushed": if the push did not confirm, it does not say saved. If you want to poke at it, it is free and local — Windows installer at roam-rho-gold.vercel.app (mac/linux in preview). Would value your read on the failure-reporting side.

[Avradeep Majumder](https://hashnode.com/@deepxdcode)

[1d ago](https://hashnode.com/posts/my-coding-agent-s-memory-hit-22-gb-in-git-the-bug-one-line-per-message/6b02ade35ff246a733445b71/comment/6b030e2d4bd8a5f8801cb00a#reply-6b031350b67adcefcccb23ac)

Thanks Ahmet — content-addressed storage was the mental model: do not rewrite a 9 MB file every ten minutes, write one immutable chunk and let git hash it once. And you are right that local persistence and remote sync are two different promises, so they get two different status lines now, plus a non-zero exit when the push does not land. Free and local if you want to try it — roam-rho-gold.vercel.app — happy to walk you through setup.

[Salman Parvez | ML Systems](https://hashnode.com/@ml-systems)

[1h ago](https://hashnode.com/posts/my-coding-agent-s-memory-hit-22-gb-in-git-the-bug-one-line-per-message/6b02ade35ff246a733445b71/comment/6b030e2d4bd8a5f8801cb00a#reply-6b057c6fe85c311c21744256)

Thanks, Avradeep. I haven't installed it, so this is only a read on what the post describes. Splitting "saved locally" from "pushed" and exiting non-zero when the push doesn't land covers the failure you hit. The one thing I'd add is the time of the last confirmed push in the status line. A failure message tells you about this run. A timestamp tells you how long things have been stale, and that is the part that went unnoticed for two days.

[Ahmet Özel](https://hashnode.com/@ahmetozel)

[2d ago](https://hashnode.com/posts/my-coding-agent-s-memory-hit-22-gb-in-git-the-bug-one-line-per-message/6b02ade35ff246a733445b71/comment/6b02b9792f11a7378a43a17c)

What a clean root cause: changing \[3/57\] to \[3/58\] invalidated every heading in a 9 MB file on every 10-minute capture, turning 296 daily snapshots into 22 GB of near-duplicate git objects. Switching to immutable per-chunk files inside each session folder matches git's content-addressed storage model instead of fighting it.

The silent-failure detail—reporting saved when local commit succeeded even though git push timed out with HTTP 408—is also a great reminder to separate local persistence status from remote sync confirmation in CLI tools.
