Grok Bot, Claude Code, and Codex Share One Second Brain
Last Updated on August 24, 2026 by Editorial Team
Author(s): Rick Hightower
Originally published on Towards AI.
Reads on main. Writes on a worktree/branch. How typed links and a write boundary stop agents from clobbering each other.
Summary: The context window is the agent’s working memory. I have agents running in Grok Bot, Claude Desktop, Claude Cowork, Codex Desktop, Grok Build, Claude Agent SDK, LangChain DeepAgents, and Claude Code. Each agent holds the lead, the draft, and the next action. It disappears when the session ends. A flat folder of notes is the common patch. It fails when the tree grows too large to read. Two rules hold it together: reads happen on the main thread; writes happen on a branch. This part explains what a second brain / LLM Wiki provides: a typed, git-native knowledge graph adds a type declaration per file, named relations between files, and a write boundary that puts a script between the model and the tree. Using a second brain/LLM Wiki lets you share data with Grok Bot.

After the lead, the article argues that when an agent tab closes, its session chat/context window dies, making “a folder of notes” unreliable as the knowledge tree grows; it then introduces the “second brain” approach: typed files (with type declarations), typed links that enable bounded graph retrieval without embeddings, and a write boundary that routes writes through scripts and reviewable Git worktrees/branches. The piece explains how reads always fast-forward from main and use a constrained “pack” (a hop- and node-bounded BFS from named roots) to create reviewable working memory, while writes are isolated per actor/session to prevent clobbering, then proposed via PRs for merging. It details enforcement mechanisms like an actor roster and a type registry (including allow/deny lanes by actor), plus provenance layers (diff review, commit/actor metadata, and write-event logging). Finally, it describes how multiple agents coordinate through shared durable institutional nouns promoted into a small shared checkout, while high-volume drafts and working records stay in satellite trees to avoid status drift, entity duplication, and promotion pressure; it also clarifies what the system is not (not a vector DB, not a CRM, not a security sandbox, not autonomous A2A).
Read the full blog for free on Medium.
Join thousands of data leaders on the AI newsletter. Join over 80,000 subscribers and keep up to date with the latest developments in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming a sponsor.
Published via Towards AI
Towards AI Academy
We Build Enterprise-Grade AI. We'll Teach You to Master It Too.
15 engineers. 100,000+ students. Towards AI Academy teaches what actually survives production.
Start free — no commitment:
→ 6-Day Agentic AI Engineering Email Guide — one practical lesson per day
→ Agents Architecture Cheatsheet — 3 years of architecture decisions in 6 pages
Our courses:
→ AI Engineering Certification — 90+ lessons from project selection to deployed product. The most comprehensive practical LLM course out there.
→ Agent Engineering Course — Hands on with production agent architectures, memory, routing, and eval frameworks — built from real enterprise engagements.
→ AI for Work — Understand, evaluate, and apply AI for complex work tasks.
Note: Article content contains the views of the contributing authors and not Towards AI.