Last week, I unveiled our fork of Open Code backed by Dolt to provide Git for Context. To recap, Git for Context can be a powerful tool for harness developers. Context diffs and branches can speed development by allowing deep context introspection and greater experimental width. On the user-facing feature front, storing and sharing context on a “GitHub for Context” makes the most sense.
In last week’s article, I only showed a short demo because my usage triggered a Dolt bug with long JSON objects containing escape strings. That bug is now fixed so I offer you a full demo.
The Setup#
You can find a full Open Code install guide in last week’s article. Once I had Open Code up and running, my goal was a DoltLite code review for code duplication and to fix all the identified issues.
DoltLite is my entirely vibe-coded fork of SQLite that has Dolt storage and version control functionality. It’s quickly becoming quite robust but it’s also a nice test bed for new agentic engineering tools like our Open Code fork.
I decided to make a /commit whenever the agent’s “turn” was over. The agent’s turn was over whenever it returned control to me, the user. These commits would exhibit the evolution of the context database.
The Result#
I pushed the resulting context database to DoltHub so you can play with it yourself. The model I used for the session was GPT-5.5.
History#
First, one of the cool features you get with our fork of Open Code is a history command. These are the prompts for my session.
[/history]
Prompts in this session (oldest first):
[ 1] 2026-06-17 14:35 hello
[ 2] 2026-06-17 14:35 what is doltlite?
[ 3] 2026-06-17 14:37 ok. let's make a small change. can you identify any useless comments that need to be removed
[ 4] 2026-06-17 14:39 make a pr
[ 5] 2026-06-17 14:48 give doltlite a code review for duplicate code. propose a list of fixes
[ 6] 2026-06-17 14:49 Review DoltLite-owned virtual table modules in /Users/timsehn/dolthub/opencode/doltlite/src for dup…
[ 7] 2026-06-17 14:49 Review DoltLite remote/chunk/storage code in /Users/timsehn/dolthub/opencode/doltlite/src for dupli…
[ 8] 2026-06-17 14:49 Review DoltLite prolly-tree implementation files in /Users/timsehn/dolthub/opencode/doltlite/src fo…
[ 9] 2026-06-17 14:49 Review DoltLite-owned merge, schema merge, workspace, record, and constraint code in /Users/timsehn…
[10] 2026-06-17 14:58 are you working on these queued tasks
[11] 2026-06-17 14:58 ?
[12] 2026-06-17 14:58 are you working on these queued tasks?
[13] 2026-06-17 15:01 fix 1.
[14] 2026-06-17 15:09 make a pr
[15] 2026-06-17 15:28 ok. what were the code review items?
[16] 2026-06-17 15:28 do you have latest master?
[17] 2026-06-17 15:29 grab latest master and switch to it
[18] 2026-06-17 15:30 you can throw away the stash. i've merged everything from this that i want
[19] 2026-06-17 15:30 ok. look at your code review items and make sure they are still relevant against current master
[20] 2026-06-17 15:31
[21] 2026-06-17 15:31
[22] 2026-06-17 15:31
[23] 2026-06-17 15:31
[24] 2026-06-17 15:37 let's de-duplicate commit graph traversal
[25] 2026-06-17 15:42 make a pr
[26] 2026-06-17 15:44 what else was on the review list we haven't fixed yet
[27] 2026-06-17 15:44 do the xBestIndex de-dupe
[28] 2026-06-17 15:49 make a pr
[29] 2026-06-17 16:02 what is left on the review?
[30] 2026-06-17 16:02 dedupe table root lookup
[31] 2026-06-17 16:07 make a pr
[32] 2026-06-17 16:08 conflict on 1450. please fix
[33] 2026-06-17 16:13 nexy on the list?
[34] 2026-06-17 16:13 fis the next dupe
[35] 2026-06-17 16:15 make a pr
[36] 2026-06-17 16:39 next on the list. everything is merged.
[37] 2026-06-17 16:43 pr please
[38] 2026-06-17 16:57 what is next on the todo list?
[39] 2026-06-17 16:58 do the last dedupe item
[40] 2026-06-17 17:01 make a pr
[41] 2026-06-17 17:01
[42] 2026-06-17 17:02
[43] 2026-06-17 17:02
[44] 2026-06-17 17:02
A couple interesting things you may notice. Open Code forked some sub-tasks in steps 6 through 9. Those somehow didn’t finish after 9 minutes but after a prompt, the agent did the review itself resulting in a list of tasks. The empty prompts at 20 through 23 and 41 through 44 are context compaction.
The other thing worth noticing is how little I actually typed. I asked the agent to “make a pr” seven times, my shortest prompt was a single ?, and almost nothing I wrote ran longer than a handful of words. The context database captures it, typos like “nexy on the list?” and “fis the next dupe” included.
Log#
You also get a /log with the commit history which in this case mirrors my prompts somewhat.
[/log]
Commits on this branch (newest first):
k2k828ne 2026-06-18 00:03:46.206 last commit was in the middle of an action. final commit for the sesssion unless ci fails
onqedu17 2026-06-18 00:02:59.500 pr request and compaction
nd659raq 2026-06-18 00:01:29.637 last fix
nebtec07 2026-06-17 23:58:11.114 next?
ktolga4k 2026-06-17 23:44:33.053 pr prompt
5c5jd6cc 2026-06-17 23:43:06.928 next fix
10m5318d 2026-06-17 23:16:47.321 make a pr
klnn28r5 2026-06-17 23:15:37.774 another fix
20prg14p 2026-06-17 23:13:32.765 next
nr2fnkat 2026-06-17 23:10:12.278 fix conflict
2n5tocfn 2026-06-17 23:08:16.352 make a pr
b6ev0che 2026-06-17 23:07:12.560 next fix.
ki5ht7l1 2026-06-17 23:02:43.110 review todo list
i3msch5r 2026-06-17 22:50:09.677 make a pr
5316ecp9 2026-06-17 22:49:00.872 fix another de-dupe
kkl8ed2b 2026-06-17 22:44:22.417 next best
3opuio7p 2026-06-17 22:43:42.792 make a pr
ji09ka7l 2026-06-17 22:42:21.216 commit graph traversal dedupe
juqudv9t 2026-06-17 22:33:54.760 compaction plus relevant items
bt37dv9h 2026-06-17 22:30:31.340 grab latest master
51a6lunb 2026-06-17 22:16:20.616 pr made
bmgjvi92 2026-06-17 22:09:36.335 first fix
9097nh7d 2026-06-17 22:01:34.178 code review
viubqs2n 2026-06-17 21:43:27.222 make a pr
sti4cmhf 2026-06-17 21:39:51.336 small code change
0vgqhr2a 2026-06-17 21:37:27.729 what is doltlite
4kcvd4cd 2026-06-17 21:35:34.317 simple prompt
This session is very typical of all my coding sessions with DoltLite. I delegate a lot of thinking to the agent providing short prompts that steer action rather than dictate a specification.
Because I commit on every turn, each of these hashes is a snapshot of exactly what the model saw at that moment. Take commit nr2fnkat, “fix conflict”, the turn where PR 1450 hit a merge conflict and the agent worked through it. If I ever want to know what context the model had when it made a given decision, I can check out that commit and read it. That’s a history of the agent’s reasoning, not just of the code it shipped.
PRs 1447 through 1453 were generated during the session.
Diffs#
At any given point you can run /diff-stat or /diff-context. Diffs give you a powerful way to assess how your context is changing.
[/diff-stat]
Diff stat HEAD → WORKING
message:
rows: 287 → 290 (+3)
added: +3 rows, +15 cells
deleted: -0 rows, -0 cells
modified: ~0 rows, ~0 cells
data: 0 B → 1.1 KB (+1.1 KB)
added rows: +1.1 KB
deleted rows: -0 B
modified rows: 0 B
part:
rows: 1386 → 1395 (+9)
added: +9 rows, +54 cells
deleted: -0 rows, -0 cells
modified: ~0 rows, ~0 cells
data: 0 B → 5.1 KB (+5.1 KB)
added rows: +5.1 KB
deleted rows: -0 B
modified rows: 0 B
[/diff-context]
Context diff HEAD → WORKING
Model: openai/gpt-5.5 (unchanged)
Messages: 16 → 20 (+4)
assistant 7 → 9 (+2)
tool 4 → 5 (+1)
user 5 → 6 (+1)
Tool calls: 12 → 13 (+1)
Total chars: 33299 → 37221 (+3922)
Approx tokens: 8325 → 9305 (+980)
Changes by position:
[0..15] identical (16 msgs)
[16] added user (+44 chars)
[17] added assistant (+3968 chars)
[18] added tool (+235 chars)
[19] added assistant (+182 chars)
This was a quiet turn: four new messages and under a thousand tokens. But the same command is how you catch the loud ones. When an agent suddenly gets expensive, slow, or repetitive, the first question is “what did it just pull into context?” A context diff answers that directly. You see the messages, tool calls, and token count a single turn added, the same way git diff shows you the lines a commit touched.
Querying#
Now, let’s say you want to know the most popular tool calls for your session. You have the full power of SQL against the Dolt database and it’s version control features.
[/sql]
SELECT
JSON_UNQUOTE(JSON_EXTRACT(p.data, '$.tool')) AS tool_name,
COUNT(*) AS usage_count
FROM part p
JOIN message m ON p.message_id = m.id
WHERE m.session_id = 'ce0da46e617d7164641849fbec8970af4bce859c_session'
AND JSON_UNQUOTE(JSON_EXTRACT(p.data, '$.type')) = 'tool'
GROUP BY tool_name
ORDER BY usage_count DESC
LIMIT 5
tool_name | usage_count
----------+------------
bash | 182
read | 123
grep | 70
apply_patch | 38
glob | 27
That ratio tells a story. 182 bash calls and 123 reads against just 38 apply_patch edits — this agent spends most of its life looking around the codebase, not changing it. And now “looking versus editing” is something I can actually measure and compare across models and sessions.
Now the most popular tool calls between the last two commits.
[/sql]
SELECT
JSON_UNQUOTE(JSON_EXTRACT(to_data, '$.tool')) AS tool_name,
COUNT(*) AS usage_count
FROM dolt_diff_part
WHERE from_commit = 'onqedu173rh6kfpr0ahgletbva67jlfn'
AND to_commit = 'k2k828nef4ja1k76a6gioc264o0d5ms8'
AND JSON_UNQUOTE(JSON_EXTRACT(to_data, '$.type')) = 'tool'
AND diff_type IN ('added', 'modified')
GROUP BY tool_name
ORDER BY usage_count DESC
LIMIT 5
tool_name | usage_count
----------+------------
bash | 6
It looks like only bash was used on that turn. And this barely scratches the surface. Because it’s all just SQL, I could as easily ask which files got read the most, how token usage trended turn over turn, or which prompts triggered the biggest jumps in context size.
Branch/Checkout/Reset#
I didn’t use these in my session so I’m tacking on an experiment branch at the end of my session with a new “random” prompt. The best use of branches is to experiment with a risky prompt or course of action that you may want to completely ditch if it doesn’t work.
To create an experiment branch I use /branch to start a new session with this context, isolated from my current context.
[/branch]
Created branch 'experiment' at HEAD
do something random
And then I can just ignore that context by going back to my previous branch.
/checkout ce0da46e617d7164641849fbec8970af4bce859c
Finally, I can reset to any previous state using the /reset command. This is destructive, just like in Git, so use with caution.
/reset onqedu173rh6kfpr0ahgletbva67jlfn
Conclusion#
I hope this more full-featured demo piques your interest in Git for Context. We are looking for feedback on the experience and whether you think it’s useful, especially if you are a coding harness developer. Come by our Discord and let us know if you try it out.
