Fixing AI Agent Dumbness: A Shared Context Tree per Repo

The real reason your AI coding agents feel dumb? They don't share the same context you have. You carry months of team history, codebase decisions, and past failures. Claw opens a fresh session with none of that. It re-derives the same architecture decision every Monday. Agent in repo A refactors a helper; agent in repo B unrefactors it. Nobody wrote down what was already agreed.
The root problem: humans and agents need the same level of context, kept up to date for both sides. Even an AGENTS.md per repo goes stale, drifts between repos, and nobody owns updating it. Notion + an MCP server was tried, but agents proposed edits that Notion silently merged wrong.
The Fix: A Context Tree Repo
One developer's solution: a repo of markdown nodes arranged in a tree hierarchy. Each node has an owner. Before each task, Claw deep-retrieves relevant nodes, reads them, and after the task proposes updates — so the context tree auto-maintains itself. Both agent and human share the exact same context.
Key Details
- Structure: A repo of
.mdfiles in a tree hierarchy. - Ownership: Each node has an explicit owner (human or agent).
- Retrieval: Agent goes deep down the tree, retrieves relevant info before each task.
- Updates: After task completion, agent proposes updates to relevant nodes — context is auto-maintained.
The approach ensures that both human and agent always operate from the same, up-to-date source of truth.
📖 Read the full source: r/openclaw
👀 See Also

Maximize Savings: Running OpenClaw Bots on a Budget
Explore ways to run OpenClaw/ClawdBot/MoltBot for free or on a budget, leveraging community tips and resourceful strategies shared on r/openclaw.

3 weeks of OpenClaw: token costs, loops, and compaction — lessons from the trenches
After burning tokens on heartbeat checks with Opus, fighting agent loops, and losing context to compaction, a Reddit user shares the hard-won fixes: use cheaper models for trivial tasks, write anti-loop rules, and save decision logs.

Three Overlooked Bottlenecks in AI Agent Workflows: Ingestion, Context Management, and Model Routing
A deep dive into the three layers often skipped when optimizing AI agents: clean input ingestion, context window management across steps, and task-appropriate model routing. Practical fixes include using structured parsing, summarized step outputs, typed schemas, and matching models to task complexity.

Running OpenClaw Inside Ollama's Docker Container for Simpler Networking
A Reddit user shows how to install OpenClaw inside the official ollama/ollama Docker container so OpenClaw talks to Ollama via localhost, avoiding host.docker.internal and extra networking setup. Trade-off is higher RAM usage.