DEV Community

Cover image for Your Context Deserves Git-Like Treatment, Just Like Your Code
Sugih AF
Sugih AF

Posted on

Your Context Deserves Git-Like Treatment, Just Like Your Code

This started as a small annoyance I couldn't let go of.

Every new Claude Code or Codex session, I'd spend the first few minutes getting it back up to speed on our codebase: the architecture, the couple of footguns everyone eventually hits, the "we do it this way because of that incident six months ago" kind of stuff.

And before anyone says it: yeah, the tools have memory now. Claude has memory. Codex has memory. I keep a CLAUDE.md and a local knowledge base. I use all of it.

The problem isn't that there's no memory, the problem is that the memory is private. It lives in my account, on my machine, in my sessions. It's not really versioned, I can't meaningfully review it, and my teammate's agent doesn't see any of it. We both end up maintaining our own slightly different understanding of the same repo, and it drifts almost immediately.

So I built Contexo. The shortest description is: GitHub for AI context. Agents push what they learn and pull what's already known through MCP, so a new session starts with context instead of starting from zero.

The first question I asked myself was: Honestly, you can.

You'd get most of the benefits already: versioning, diffs, sharing, ownership. I'm not going to pretend Git isn't doing most of the heavy lifting here, Contexo uses Git underneath too.

The difference is who does the work.

With a normal context repo, you're the librarian. You have to remember to tell the agent to write things down, remember to commit, remember to pull before starting work, and deal with merge conflicts yourself. That's all reasonable, but it's also the sort of workflow people stop following after a couple of weeks.

With Contexo, the agent handles that loop:

  • Pulls context automatically before it starts working

  • Captures what it learned and pushes it back without manual commits

  • Generates section-aware diffs that are readable for prose

  • Warns when you're working against stale context

  • Reconciles conflicting edits between agents instead of handing you Git conflict markers

So the way I think about it is: a context repo is the manual version; Contexo is the same idea with the agent doing the bookkeeping.

One thing I ended up liking more than I expected is that it stores the why, not just the what. The agent records the decision, the reasoning behind it, and what alternatives were rejected. Three months later, you can usually tell why past-you made a decision instead of staring at a mysterious note and guessing.

The core is open source and self-hostable, and there's a hosted version if you'd rather not run it yourself. It works with Claude Code, Codex, Cursor, and anything that speaks MCP. It's still early, free, and I'd genuinely like people to break it and tell me where it falls down.

I'm also curious how everyone else is handling AI context across a team. Are you all maintaining your own CLAUDE.md files, or have you found something that actually scales?

Repo

Website

X/Twitter

Top comments (1)

Collapse
 
hereforlolz profile image
Nidhi

Man, I’m facing the same thing. The hardest part isn’t getting an agent to do a task once.....it’s keeping the right context without it becoming stale or bloated.

One thing I keep running into is copy-pasting context over and over. It works, but it feels like we’re paying the same memory/attention cost every session instead of having a cleaner way to reuse the right pieces.

I’ve been exploring this from the execution side with treating context more like a runtime dependency: bring in what’s needed for the task, then avoid carrying everything forever.