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

# Pull requests

> How Langy changes your code: bot-authored pull requests through a GitHub App, credited to you, reviewed by a human before merge, with the Scenario tests it wrote running in your CI.

Langy changes code in exactly one way: it opens a pull request. It pushes only to the branch it creates for that PR, never to your default or existing branches, and it never merges its own PR.

<Info>**Also check:** [GitHub access](/docs/langy/security/github-access) (the scopes and the boundary), [GitHub App setup](/docs/self-hosting/langy/github-app) (registering the app when self-hosting), [Scenario tests and evals](/docs/langy/scenario-tests-and-evals) (what runs in CI on the PR).</Info>

## How a Langy PR is made

<Steps>
  <Step title="Langy drafts the change">
    After it [reads your traces and writes a failing test](/docs/langy/chat), Langy drafts a fix on a branch.
  </Step>

  <Step title="It opens a bot-authored PR">
    The GitHub App opens the pull request on the installed repo. The commits are authored by the bot; you are credited with a `Co-authored-by` trailer and a "Requested by @\<your-login> via LangWatch" note on the PR.
  </Step>

  <Step title="Your CI runs the tests it wrote">
    The Scenario simulation tests Langy wrote run in your CI on the PR, so the PR carries its own proof.
  </Step>

  <Step title="A human reviews and merges">
    You review the PR like any other. Langy never merges; a person does.
  </Step>
</Steps>

<Note>Langy contributes to your codebase exclusively through pull requests. Nothing touches your code without a human approving the merge.</Note>

## The install is the access boundary

Langy can only open PRs on repositories the GitHub App is installed on. The install is the boundary: there is no per-user OAuth and no stored personal token.

If the app is not installed on a repo, Langy stops the turn the moment it reaches for `git` or `gh`. It shows an Install card in chat, then re-runs the turn once you install it.

For the exact GitHub App permissions (Contents read/write, Pull requests read/write, Metadata read) and the token model, see [GitHub access](/docs/langy/security/github-access).

## Limits

<Warning>Langy opens at most **20 pull requests per day**. This limit is fixed.</Warning>

To register the GitHub App on a self-hosted install, see [GitHub App setup](/docs/self-hosting/langy/github-app).
