Skip to content
AddHunt
Agent skills & plugins

ctx

Search and blame local coding agent history from the CLI

Works with macOS, Linux, WindowsOpen source

  • Open source
  • Licence: Apache-2.0

In short

ctx is an open-source command-line toolchain that indexes local coding agent sessions for search, traces code back to the session that wrote it, maps a codebase as a graph and trims noisy tool output. It is for developers using agents such as Claude Code, Codex and Cursor.

What you get

  • Text and semantic search over local agent sessions
  • Blame that links code to the session that wrote it
  • Tracking of parent sessions, subagents and forks
  • ctx graph for codebase relationship maps
  • ctx sift to cut noisy tool output
  • Automatic local indexing with no hooks

The details

ctx treats the transcripts that coding agents leave on a developer's machine as a searchable record. Session logs from tools such as Claude Code and Codex usually sit in JSONL files or SQLite databases in folders like ~/.claude and ~/.codex; ctx setup finds these sources, reads them without changing them and converts each format into consistent local records of sessions, messages, tool calls and repository activity.

Search and blame

Agents or people can then query earlier work in plain language or by file, retrieve an exact event or full transcript and see where it came from. Blame links lines of code to the session that produced them. Parent sessions, subagents and forks are tracked, so a whole chain of work can be recovered. The project positions this as an alternative to agent memory: instead of compressed summaries, agents get the original record.

Graph and sift

  • ctx graph maps relationships across a codebase
  • ctx sift filters noisy tool output before an agent reads it

Setup

Indexing runs automatically without hooks or code inside the agent process, and updates become visible only once complete. ctx installs with a shell script on macOS and Linux or PowerShell on Windows, or can be built from source. Guides cover Claude Code, Codex, Cursor, Pi, OpenCode, Gemini CLI, Copilot CLI and Factory Droid.

Alternatives to ctx

All alternatives

Questions

Does ctx change my agent's session files?

No. ctx setup reads the existing session sources without modifying them and keeps its own index locally.

Which coding agents does ctx work with?

Its docs include guides for Claude Code, Codex, Cursor, Pi, OpenCode, Antigravity or Gemini CLI, Copilot CLI and Factory Droid.

How is ctx different from agent memory?

Agent memory usually condenses past work into facts or summaries. ctx instead gives agents access to the complete original transcripts and tool calls.

More like this