About Ctx
ctx is an open source command line toolchain for context engineering with coding agents. Its core job is to make the session history that agents such as Claude Code, Codex, Cursor, OpenCode, Gemini CLI and Copilot CLI already leave on your machine searchable, so a new session can recover earlier decisions, failed approaches and investigations instead of repeating them. It also offers blame for code, tracing lines back to the agent sessions that wrote them.
It is aimed at developers who run coding agents heavily and want less repeated work and lower token spend. Setup discovers local history stored as JSONL files or SQLite databases, reads them without modifying anything, and normalizes each provider's format into consistent local records for sessions, messages, tool calls and repository activity, indexed with Tantivy. It understands parent sessions, subagents and forks, needs no hooks inside the agent process, makes no model API calls, and keeps its index current automatically. Two companion tools extend it: ctx graph maps relationships across a codebase, and ctx sift trims noisy tool output before an agent reads it. Custom history plugins let other tools register their own history files.
ctx is free and released under the Apache 2.0 license. It installs with a single shell or PowerShell command on macOS, Linux and Windows, or can be built from source, and no paid tier is published.
The project distinguishes itself from agent memory products, which summarize past work into facts, by giving agents access to the original record without a lossy summarization step.