All AI systems
Case study · Gwee Per Ming
Cross-Agent Context Engineering
A persistent second brain that carries evidence-cited context between Claude Code and Codex sessions.
The problem
Coding-agent sessions lose useful context when work moves between tools or restarts. Raw transcript replay is expensive and does not guarantee relevant, verified recall.
My contribution
Built a transcript-native memory pipeline that consolidates evidence-cited, wikilinked memories into Obsidian, then connects Claude Code and Codex through native lifecycle hooks and a hybrid retrieval system.
Architecture and stack
Rust, SQLite FTS5, BM25, vector search, graph reciprocal-rank fusion, all-MiniLM-L6-v2, MCP, CodeGraph, Claude Code and Codex hooks, and a Next.js monitoring console.
- Rust
- SQLite FTS5
- Hybrid retrieval
- MCP
- Claude Code
- Codex
- Next.js
What runs today
A local-first system integrated into both coding-agent lifecycles. Its console tracks retrieval quality, hook delivery, system condition, and deployment drift.
Outcome
Reached 96.0% Recall@5 and 0.922 MRR across 246,750 turns, while keeping session-start orientations at or below 1,500 tokens.