Whether you use pre-built AI coding tools like Claude Code, OpenAI Codex, OpenCode, and Cursor, or you are building custom autonomous agent runtimes in TypeScript, every agent environment suffers from the same limitation:

Every new chat or execution trajectory starts with zero knowledge of past decisions.

Switching git branches or spawning subagents confuses the agent about active dependencies.

When an agent compacts its context window to manage token limits, it erases the rules established earlier.

This guide is a practical cookbook for attaching MemoFS—the open-source, file-first memory runtime—to any AI coding agent or custom agent runtime in under two minutes.