Your AI coding agent starts every session like it just met you
I have eight months of Claude Code and Codex logs sitting on my disk. Roughly 1,600 sessions, close to 3 million tokens of me actually working. Every argument about whether something was "done," every time I rejected a design, every "no, do it this way." It is the most honest record that exists of how I think when I build.
And every new session, my agent reads none of it. It starts from zero. Polite, capable, and with no idea who it's talking to.
So I built a small tool to fix that. It's called Ditto, it's one Python file, and it's open source.
Memory is what you told the model. This is what your work proved.
Most "memory" for agents is a file where you write down facts about yourself. Your stack, your preferences, your rules. That's fine, but it has a problem: it's you performing for the agent. You write the version of yourself you think you should be.
Your session logs are the opposite. Nobody performs in a debugging session at 1am. The logs hold what you actually reject, what "done" actually means to you, when you actually stop and ask for proof, how you actually talk when you're heads-down. That's the raw material Ditto reads. Not your CLAUDE.md. The real transcripts.
It mines those into a you.md your agent loads before every task.
How it works (the whole thing is auditable)
There's no service, no account, no magic. It's a stdlib Python script you can read top to bottom:
- It finds your local session logs (
~/.claude,~/.codex, Copilot) and pulls out the messages you typed. Not the agent's replies. You. - It redacts secrets and PII before anything is written to disk. Keys, tokens, emails, the usual. This happens first, not as a cleanup pass.
- It dedupes the long repeated blocks (the same spec pasted 40 times) so you're not mining noise.
- It writes the redacted corpus into chunks sized for an agent to actually read.
- You point your coding agent at those chunks with the included mining prompt, and it compiles a
you.md: your working laws, your taste, the agent behaviors that make you stop the task, with real quotes as evidence.
The extractor itself makes zero network calls. The only text that reaches a model is the redacted chunks you hand to your own agent, in your own tool. On a local model, the whole thing stays on your machine.
What actually changes
Here's a real run. I asked an agent to help me launch this repo. One line: "help me post ditto on reddit." Same model, once cold, once with my Ditto profile loaded.
Cold, it gave me the confident generic thing: a title with a colon in it, three bullet points about "key features," an emoji, a call to action. The kind of post that reads like every other launch and gets scrolled past.
With my profile loaded, it wrote the way I actually post. Lowercase, no hype, led with the uncomfortable part instead of the feature list, and stopped trying to sell. Because the logs had taught it that I reject exactly that kind of launch copy, every time.
That's the difference. Not "the agent knows my name." The agent makes the same taste calls I would have made, so I'm editing instead of rewriting.
What it doesn't do yet
Being honest, because this is early open source:
- It samples your history, it doesn't read every token of it. A rare habit you only showed once might not make the cut. That's a deliberate tradeoff against cost, and I'm calibrating where the line sits.
- The profile is only as good as your logs. If you've done two weeks of coding with an agent, there isn't much to mine yet.
- It reads how you work, not what you know. It won't replace your notes or your docs. It sits next to them.
Try it and tell me the weird one
If you run it, the interesting moment is when it surfaces something true about you that you never wrote down. When that happens, post the single weirdest trait it found. Not your whole you.md, just the one line that got you.
Repo: github.com/ohad6k/ditto
If it breaks, or it misses something about how you work that it should have caught, open an issue. Every real history I get to test it against makes the mining sharper.
Top comments (0)