SuperAPIAI Directory

cogit

github.com · AI coding

cogit is an intent-recording tool for AI coding agents, positioned as "Git for the intent behind the code an agent writes." Through a plugin and hook mechanism, it automatically records every conversation between the user and the AI agent in Claude Code or Codex CLI, saving each message as a "thought commit" that records the question, the result, the reasoning behind decisions, and the options that were rejected, and it links code commits to the intent behind them via a Thought trailer in the commit message. Users can trace why any line of code exists via commands such as cogit why and cogit blame. The tool also provides features such as a session map, task capture, PR description generation, and team-shared records; data is stored locally, with no server or account required.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

cogit is a plugin that runs inside AI coding agents and is designed to solve the problem of "lost intent" when AI generates code. It records every interaction between the user and the coding agent, saving each message as a "thought commit" that contains the question, the result produced, the decisions and their reasoning, the options that were rejected, and which earlier message this message continues from. Code commits are linked to these thought commits via a Thought trailer, so cogit why can trace any line of code back to the reason it exists.

Main capabilities include:

  • Session map: displays sessions as a Git graph, one message per line, showing decisions and where interruptions occurred; supports branches, decisions, a "Your turn" inbox, and Resume and Fork buttons (copy a command to reopen or continue a session).
  • Intent, shape, code: for messages that produced commits, shows "why it happened," a small diagram of the change (chart, before/after comparison, interface table, example, or steps), and the diff.
  • Task capture: at the end of a session, a small model captures unfinished work items, which the user can accept, ignore, or close; off by default, can be enabled via cogit config set captures true.
  • PR description: cogit pr generates a pull request description containing the goal, decisions, and rejected options, without the raw chat; cogit pr --install-action adds a GitHub Action to post it on every PR.
  • Team sharing: records are shared via Git; after pulling, teammates' sessions also appear on the map, showing who ran them and the main changes.
  • Recording method: by default a small model records in the background without interrupting the agent; at the end of a session, the original model reopens the entire conversation and corrects the record, consuming about one extra message. Economical mode records entirely with the small model, measured at under 2 cents per 20 messages.
  • Privacy: no server, no account, data stored locally; cogit init asks whether to share records with the team (titles, decisions, and reasoning), and if shared they are pushed to your own repository via git push and do not appear in branches, PRs, or git status; chats stay local, cogit prune can delete old sessions, and key and token patterns are redacted.
  • Agent context: new sessions start where the last one left off, and the agent can query what has been decided and rejected via cogit why.

Usage: requires Node 22.13+, a Git repository, and Claude Code 2.1.275+ or Codex CLI 0.167+. Install the plugin in Claude Code; in Codex, install from the terminal and accept the hook review in the project (you will be asked again after each cogit update). If the map is empty, run cogit doctor. After that, use Claude Code or Codex normally to record automatically, and open the map with cogit open.

Use cases: tracking work progress when managing multiple projects or multiple agents at the same time; understanding the reasons for changes during code review; sharing decision records within a team; tracing decisions and rejected options in code history.

Limitations: depends on specific versions of Claude Code or Codex CLI; requires Node 22.13+ and a Git repository; task capture is off by default; sharing records requires the user to opt in; some features (such as PR description generation) require additional GitHub Action configuration.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools