GitHub App
Install the Sophonz GitHub App on your repository to automatically create issues and suggest code fixes driven by real-user error data collected by the Sophonz SDK.
Install sophonz-github on your app repository and it will analyze problems (errors, crashes, performance issues) collected from real users instrumented with the Sophonz SDK, then automatically open issues and propose code fixes as pull requests.
How it works
sophonz-github fetches runtime error data via Sophonz MCP, then an AI agent creates a patch branch and opens a Pull Request.
On every tick of the schedule defined in .sophonz/config.yml, the app:
- Queries Sophonz for the top errors within the configured time window
- Maps stack frames to files inside the repository
- Drafts a patch with a Claude-based AI agent
- Opens a pull request, grouping changes by error signature
For a full overview of the AI Agent pipeline, see AI Agent Overview.
Installation
Step 1: Install the App
Install sophonz-github on your target organization or repository from the GitHub Marketplace or via Integrations → GitHub App in the Sophonz console.
TIP — Installation scope
It is recommended to select only specific repositories during installation. You can add more later under Settings → Applications.
Step 2: Approve the onboarding pull request
Immediately after installation, the App opens an onboarding pull request that adds .sophonz/config.yml to the repository root. Review the contents and merge it.
Step 3: Configure the app connection
Fill in the app details in .sophonz/config.yml — either in the onboarding PR or in a follow-up PR.
service:
namespace: "<your-project>"
name: "<your-app-name>"
key: "${{ secrets.SOPHONZ_SERVICE_KEY }}" # reference a repository secret
schedule: "every weekday before 9am" # or cron, e.g. "0 0 * * 1-5"
window: "24h"
topN: 10
ai:
model: "claude-sonnet-4-6"
maxIterations: 4
pr:
branchPrefix: "sophonz/"
labels: ["sophonz", "bug"]
draft: false
groupBySignature: true
scope:
allowedPaths: ["src/**", "apps/**"]
blockedPaths: ["**/node_modules/**", "**/dist/**"]
triggers:
schedule: true
workflowFailure: true
manualComment: trueStore service.key as a GitHub repository secret (Settings → Secrets and variables → Actions) and reference it as ${{ secrets.SOPHONZ_SERVICE_KEY }}. Do not commit the key in plaintext.
Once the configuration file is merged, the App runs automatically on the defined schedule.
Required permissions
The App requests the following permissions during installation.
| Permission | Level | Purpose |
|---|---|---|
| Contents | Read & Write | Read source code and create patch branches |
| Pull requests | Read & Write | Open PRs and post review comments |
| Issues | Read & Write | Respond to slash commands |
| Actions | Read | Detect workflow failures (optional) |
| Metadata | Read | Required by GitHub |
Subscribed events: Workflow run, Pull request, Push, Issue comment
Pull request contents
Each generated PR includes:
- Error message and the most affected app version
- Occurrence count and number of affected sessions
- Last-seen timestamp
- Mapped stack frames
- Related trace IDs (linked to the Sophonz dashboard)
- A short summary of the AI agent's reasoning
Slash commands
The following commands are available in PR comments.
| Command | Effect |
|---|---|
/sophonz retry | Regenerate the patch with the same input. |
/sophonz explain | Post a longer explanation of the proposed change. |
/sophonz skip | Suppress further PRs for this error signature for a period. |
/sophonz run | Run an analysis immediately, ignoring the schedule. |
Data handling
service.keyis read from the repository secret at runtime, used transiently for the Sophonz MCP call, and never persisted.- Repository code is sent to the LLM only at patch-generation time and is not used for model training, per the Anthropic API policy.
- Error data and repository code are not sent anywhere outside your Sophonz workspace and the LLM provider used to draft patches.
CAUTION — Experimental
sophonz-github is currently at v0.x, validating the install flow, MCP integration, and single-signature patch pull requests. Test it on a staging or sample repository before pointing it at production code.