This post describes how to collect the working context of AI agents such as Claude Code in a single Obsidian wiki and pull it back in from a new session. It adapts the LLM Wiki pattern Andrej Karpathy published for day-to-day work, and between 2026-08-20 and 2026-11-08 it accumulated 166 wiki pages and 140 log entries. The focus is on what the user sets up and what they say, with a short explanation of what the agent does in response.
What an LLM Wiki is
An LLM Wiki is a markdown wiki that the agent itself organizes and keeps updating. RAG, where you upload documents and the model retrieves relevant chunks on every question, starts the search from scratch each time. In an LLM Wiki, when something new comes in, the agent edits the existing pages and marks anything that conflicts. The user only has to say "save this" or "look it up."
When a session ends, the agent forgets what was decided. If decisions and failures are written to the wiki, the next session reads the wiki and carries on instead of being briefed from the start. Sessions in other projects, and other agents, read the same wiki.
The wiki folder has three parts:
-
raw/— source material such as articles, external documents, and conversation logs. The user adds it; the agent only reads it. -
wiki/— decisions, failure records, and project context distilled from sources and session results. The agent writes and updates it. -
conversations/— session handoffs that are not settled yet.
Setup
Open the wiki folder as a vault in Obsidian, then run the install script once from inside the wiki folder.
./scripts/install-global.sh
The install script links a short routing note into Claude Code's global settings. The note only says "when you hear one of these phrases, read the wiki's CLAUDE.md first"; the actual rules live in one place, the CLAUDE.md in the wiki folder. That is why the wiki can be called from Claude Code in any project folder. On a new computer, clone the wiki repository and run the script again.
Once that is done, say "check the wiki" in any project. The agent reads the wiki's index and recent log, and sums up the key context and open work in a few lines.
What to say
There are five commands, and the agent picks one from what you say in plain language. In this setup the trigger phrases are written in Korean; the table below gives their meaning.
| What you say | What the agent does |
|---|---|
| "check the wiki", "bring back the earlier context" | Reads the index and the last 10 log entries and summarizes the context. Writes nothing |
| "save this to the wiki" | Picks what is worth keeping from this session, saves it, and commits |
| "move raw into the wiki" | Reads sources in raw/, distills them, and updates the related pages |
| "answer from the wiki" | Answers based on wiki pages and shows the paths of the pages it relied on |
| "lint the wiki" | Looks for broken links, decisions without a source, and similar problems, and only reports them |
If a question is attached, as in "check the wiki: what did we decide about the payment module?", the agent goes to answering that question. Saving happens only when the user asks. The agent never writes to the wiki on its own, so if a session produced something worth keeping, say "save this to the wiki" before you finish.
After a save, the agent reports what it created or changed, what it did not save and why, and which pages the next session should read first. The wiki is a git repository, so every save is committed and pushed, and that result is part of the report too.
What gets saved
Saying "save this" does not save everything. Before saving, the agent checks five things, and if none apply, nothing goes into the wiki:
- Will this information be reused?
- Does another session or a colleague need to read it to pick up the work?
- Will someone need to trace the reasoning behind a decision and who made it?
- Is it a failure that should not be tried again?
- Is it a shared rule everyone has to follow?
One-off answers, intermediate thinking, proposals the user has not approved, and unsupported guesses stay out of the wiki. If they might be worth checking later as evidence, they go only into conversations/. The more you save, the harder it gets for the next session to tell what matters.
The agent also records how well each page has been checked. It separates what it confirmed by running it, what a person or a document said, and what it inferred, and a page backed only by inference is never marked as settled.
That distinction pays off when checking what other sessions wrote. On 2026-10-25, after several sessions had each recorded parts of the notes on a real-device testing tool, a new session was asked to check whether the records were right. The cause of one feature not working had been written down as a guess; it was confirmed from the issue comments and corrected. Another line that could not be verified all the way was toned down to "circumstantial only."
When several sessions share it
Sessions from several projects can save to the wiki at the same time. Pages are split by topic, so they do not collide, and the agent locks the index (index.md) and the log (log.md), which every save edits, before changing them. Measured without the lock, 77 of 120 entries were lost; with the lock, none were. The locking approach came from the wiki skill in oh-my-claudecode, which implemented the same idea first.
Commits do not get mixed up either. The agent commits only the files this task touched, and either commits changes left by another session separately or leaves them alone. Agent commits carry Claude (agent) as the author, so you can tell them apart from changes a person made directly.
git log --author="Claude" --oneline # what the agent recorded
Over time, the user also has to remember to lint. Saves get requested every session, but linting does not happen unless you ask for it. Running the lint script on 2026-11-08 produced 23 findings from the automated checks: 21 large pages that might have copied source text wholesale, and 2 pages nothing links to. Whether a large page is a copy of the source or has legitimately grown and needs splitting is not decided by the agent; a person reads it and decides.
References
- Andrej Karpathy, LLM Wiki: https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f
- Claude Code memory (importing into CLAUDE.md): https://code.claude.com/docs/en/memory
Top comments (0)