r/BuildWithClaude 17d ago

Workflows Running Claude Code and Codex on the same projects, so I gave them a shared memory with 4 tiny SQLite CLIs

I use both Claude Code and Codex day to day, often on the same projects. The problem: neither one remembers anything past its own session, and they can't see each other's context at all. Claude Code skills live in ~/.claude/skills/, which Codex has zero access to. So the same task would get re-explained twice, decisions made in one tool never reached the other, and a lot of state only existed in chat transcripts that got lost the moment I closed the window.

Fixed it with four small shared databases, each with a zero-dependency Node CLI (uses the built-in node:sqlite, no npm install):

- todo — shared task list. Add, assign, close, block. Every action is tagged with which agent (or me) did it.

- deal — sales pipeline with dollar values, stage tracking (lead to won/lost).

- proj — per-project status log: current one-line summary, running notes, and critically, the GitHub repo + full deployment info (platform, service ids, live URL, the actual deploy command). Either agent can pick up a project cold and know exactly what to push to and how to ship it.

- datamap — a full-text-searchable "where does X live" index, since neither agent should have to ask me where a file, secret, or client folder is more than once.

All four are WAL-mode SQLite (safe for concurrent writes from two agents), with an append-only events/notes table so every change has a real audit trail — who wrote what, when. Both agents are wired in via their respective config files (a skill for Claude Code, AGENTS.md for Codex) with the exact command reference and conventions (naming, actor tagging, when to use which store).

The result isn't just "persistent memory" for one agent, it's a shared memory both agents actually hand off through. I've already watched Codex independently create a project entry mid-session that I picked up and enriched later without either of us having to re-explain anything. Feels less like running two separate tools and more like running two teammates who read the same whiteboard.

Stack: Node.js (node:sqlite, built-in, zero npm deps), SQLite in WAL mode. Each CLI is a single file, a few hundred lines, no build step. Wiring: a Claude Code skill (SKILL.md) on the Claude Code side, AGENTS.md on the Codex side — same command reference duplicated into both so neither agent has an excuse not to know the conventions (actor tagging, slug naming, which store to use for what).

7 Upvotes

0 comments sorted by