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

# Pull Requests

> See which agent sessions worked on each pull request, and what it cost.

Dari links each agent session to the GitHub pull requests it worked on. From the agent's own tool output, with nothing to install:

* a session that opens a pull request (`gh pr create`) is linked to it
* a session that runs `gh pr view`, `gh pr checks`, `gh pr merge`, or another `gh pr` command on a pull request's URL is linked to it
* a session that pushes a pull request's branch is linked to it, which picks up later sessions that fix CI or review comments. A quiet push (`git push -q`) prints nothing to read, so it links only through its commits (below).

## Commits

`dari claude` and `dari codex` also add a `post-commit` hook to the repository they start in, so commits link too, including the ones you make yourself:

* a commit the agent makes is reported for its own session
* a commit you make by hand is reported for each Claude Code session (launched with `dari claude`) that took a prompt in the same worktree in the last day

The commit links its session to the pull request on the commit's branch: the one an agent opened, or, when the [GitHub CLI](https://cli.github.com) is signed in, the branch's open pull request even if you opened it yourself. A session's commits show on its page.

```bash theme={null}
dari git-hook remove    # stop linking this repository's commits; launches won't add the hook back
dari git-hook install   # start again
```

The hook runs in the background after each commit and sends the repository, branch, commit SHA, and pull request number, never the code. It is added only to a shell `post-commit` hook in `.git/hooks`; a repository that keeps its hooks elsewhere (`core.hooksPath`, as Husky and Lefthook do) can run `dari git-hook post-commit &` from its own hook.

## Where They Show

Pull requests appear on each session in **Activity → Agent Sessions**, and admins see every pull request, with its cost, tokens, models, people, and sessions, in **Activity → Pull Requests**:

```bash theme={null}
dari activity pull-requests list --search login
dari activity pull-requests show acme/web#7
```

Only GitHub is recognized. Sessions on a ZDR router keep no content, so Dari cannot see their pull requests in tool output; their commits still link. A session linked to several pull requests counts fully toward each of them.


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