Skip to main content

How it works

When you tell your coding agent “save this session with GitWhy,” the agent generates a structured markdown context capturing:
  • Prompt — what you asked the agent to do
  • What was done — the actions taken
  • Reasoning — why this approach was chosen
  • Key decisions — binary choices and rationale
  • Rejected alternatives — what was considered and why not
  • Files & commits — linked to the exact code changes
The context is stored locally in your repo’s .gitwhy/contexts/ tree and auto-synced to the API.

Try it

Tell your agent:
The agent calls gitwhy_save (MCP) or pipes structured markdown to git why save (CLI). Either way, you get back a context ID like ctx_a1b2c3d4.

Why it matters

Git tracks what changed. GitWhy tracks why it changed. When the next developer (or agent) picks up the code months later, the reasoning is right there.