> ## Documentation Index
> Fetch the complete documentation index at: https://docs.payback.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Code

> Hooks in Claude Code's settings; nothing to do after setup.

## How it hooks in

Setup adds command hooks to `~/.claude/settings.json` for `UserPromptSubmit`, `Stop`, `SessionStart`, `SessionEnd`, `PreCompact` and `PostCompact`. Each runs `payback hook claude <event>`. Your other hooks are left as they are.

It also raises `cleanupPeriodDays`, since Claude Code deletes transcripts older than 30 days on every start and sessions need to be there when they're offered for review.

## What is captured

Every turn in a repository the [allow list](https://docs.payback.sh/repositories.md) covers: the tree before and after, the transcript slice, model and timestamps. The full transcript at the end of a session. See [What is recorded](https://docs.payback.sh/recording.md).

## Manual steps

None. If Claude Code was open during setup, the hooks are picked up on its next start.

## Turning it off

`payback pause` stops every agent; `payback uninstall` removes the hooks from `settings.json` and restores `cleanupPeriodDays` if payback set it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.