Integration

GenZAgents for Claude Code — receipts for every coding session

Claude Code is where the codebase decisions get made. GenZAgents captures the Stop-hook session, the auto-commit, and the tool calls in between — every receipt tagged with the engineer, project, and the git ref it was on.

Per-engineer attribution by design

Every receipt issued from a Claude Code session is tagged with the human DID of the engineer at the keyboard. This matters when a security review later asks "which engineer ran which tool calls during the incident on June 14th?" — your answer is a filterable receipt query, not a guess from Slack logs. Per-engineer attribution costs zero extra config: the human DID lives in ~/.genzagents-mcp-env (mode 600) and the MCP server reads it on every tool call.

Auto-receipt on git commit

Install the post-commit hook from `scripts/auto-receipt-on-commit.sh`. Every commit emits a receipt that includes: commit SHA, commit body (the rationale, not just the diff), the files touched, and the project tag. Run it with `--since=<rev>` to backfill previous commits — useful when you join GenZAgents mid-way through a project and want the past 3 months of work to show up on the agent's receipt feed.

Stop-hook session capture

Claude Code emits a Stop event when the user ends a session (Cmd-K → /quit or just closes the window). The GenZAgents MCP server hooks this event and issues a single summary receipt covering the whole session. The summary includes: total tool calls made, files read, files written, commits issued, runtime cost. One receipt per session keeps the receipt-per-tool-call noise manageable while preserving an end-of-session audit trail.

Per-project tagging via .mcp.json

Drop the .mcp.json in the repo root with a `GENZAGENTS_PROJECT=acme-checkout` env var. Every receipt from sessions opened in that directory inherits the project tag. When you have 50 repos and 12 engineers, this is the only way to keep the receipt feed legible — "show me everything tagged acme-checkout in the last 30 days" beats scrolling through 4,000 entries.

Org-wide de-dup on conversation start

The `org_context_lookup` MCP tool fires at the start of every Claude Code conversation. It queries the org's receipt pool against the first user prompt and surfaces matches: "Sarah did this on May 3rd — see receipt rcpt_01XK… Want to start from her work?" Maria saves a day of redundant work. This is how the v0.6+ proactive de-dup loop pays back its cost on the first month of use.

Cost attribution per repo and per engineer

Every receipt logs the model used and the runtime cost in USD. The dashboard rolls these up: "Bob spent $187 on Claude Code this month, $142 on acme-checkout and $45 on internal tools." This is the per-team per-project cost ledger that AI spend reports want — your CFO stops asking "what is the Anthropic invoice paying for?" because the answer is one filtered receipt query away.

Install

Per-project: create .mcp.json in repo root:

{
  "mcpServers": {
    "genzagents": {
      "command": "npx",
      "args": ["-y", "@genzagentsio/mcp-server"]
    }
  }
}

Global: same block in ~/.claude.json. Restart Claude Code.

What we capture

Stop-hook session events, auto-receipt-on-commit hook commits, every MCP tool call, and (optionally) the first user prompt of the session.

Verify it works

Open Claude Code on any repo with the .mcp.json above → ask Claude to read a file → end the session → check /dashboard for a session-completed receipt.

Common questions

Do I need a paid Claude Code license to use GenZAgents?

Yes — GenZAgents sits above Claude Code, it doesn't replace the underlying Claude API access. You need an Anthropic API key configured in Claude Code for it to function; we then attach receipts to whatever it does.

Does the auto-receipt-on-commit hook ship with Claude Code or with GenZAgents?

With GenZAgents. The script is in scripts/auto-receipt-on-commit.sh in this monorepo. Copy it into your repo as .githooks/post-commit and configure git core.hooksPath to point at .githooks.

Can I redact specific files from being included in receipts?

Yes. Set GENZAGENTS_REDACT_PATHS=secrets/,*.env in the env block. The MCP server hashes any file path matching those patterns instead of including the content.

What if my engineers refuse to install yet-another agent?

The org install token model lets IT push @genzagentsio/setup via MDM (JAMF / Intune / Workspace ONE). Engineers see GenZAgents installed alongside their other tools after the next laptop sync. They don't click anything.

Related

Get the trust layer for your AI work

GenZAgents is the verified work-history layer above every AI provider your team uses. Sign cryptographic receipts, hand off conversations across Claude / ChatGPT / Cursor / Gemini, keep institutional AI knowledge when employees leave.

Last reviewed · 3 min read· Open spec· Changelog