How to use Sazabi with Replicas: from production root cause to pull request
Published
Summary
Connect Sazabi and Replicas so diagnosed production issues go straight to a cloud coding agent, and workspaces can query live production logs over MCP.
Sazabi watches production logs, groups failures into issues, and writes a root-cause report with supporting evidence. Replicas runs coding agents such as Claude Code, Codex, Cursor, OpenCode, and Pi inside isolated cloud workspaces with your repositories and tools.
Connecting the two closes the gap between finding a production bug and opening a tested pull request. You can hand a diagnosed Sazabi issue straight to a Replicas agent, let a Replicas workspace query live Sazabi logs over MCP, or let Sazabi's own agent spin up and steer Replicas workspaces.
How a production issue moves from Sazabi to a Replicas pull request
01
Sazabi
Production logs
Finds an issue and writes a root-cause report
Reads logs and code to summarize what broke, why, and the supporting evidence
02
Fix handoff
Dashboard, CLI, or Auto-fix
Sends the issue to Replicas
sazabi issues fix "$ISSUE_ID" --agent replicas
03
Replicas
Isolated cloud workspace
Runs a coding agent on your repository
Edits code, runs tests, and optionally queries live Sazabi logs over MCP
04
Issue thread & GitHub
Pull request
Streams updates and links the pull request
Progress, questions, and the PR appear in the Sazabi issue thread
What Sazabi handles
Continuous log monitoring, root-cause analysis, the issue thread, and pull request status tracking
What Replicas handles
The isolated cloud VM, repository and environment setup, coding agent execution, and opening the pull request
Choose how to connect Sazabi and Replicas
Sazabi and Replicas support three separate connections. Each has its own setup, credentials, and direction of traffic, and turning on one does not turn on the others.
| Connection | Direction | Best for | Credential | Where you set it up |
|---|---|---|---|---|
| Core integration (Fix handoff) | Sazabi → Replicas | Sending a diagnosed issue to a Replicas coding agent from Fix, the CLI, or Auto-fix | Replicas organization API key | Sazabi Settings → Integrations → Replicas |
| Sazabi MCP or native plugin | Replicas → Sazabi | Querying live production logs, reading issues, or asking the Sazabi agent from inside a Replicas workspace | Sazabi OAuth sign-in | Replicas Environment → Tools (Suggested MCPs) or Organization → Integrations |
| Replicas MCP connector | Sazabi agent → Replicas | Letting Sazabi's agent create workspaces, send messages, read chat history, or manage automations from any thread | Replicas organization or personal API key | Sazabi Settings → MCP connectors → Replicas |
Most teams start with the Core integration so engineers can hand off issues from Sazabi with one click. Adding the Sazabi MCP to the same Replicas environment is a useful second step because the coding agent can then check live production logs to confirm the error is still occurring before it writes a fix.
Hand off a Sazabi issue to Replicas
The core integration registers Replicas as a coding agent inside Sazabi. When someone chooses Fix on an open issue, Sazabi sends the root-cause report to a Replicas workspace, streams the agent's progress and questions into the issue thread, and links the resulting pull request back to the issue.
Prerequisites
- Replicas GitHub integration: Install GitHub in Replicas Integrations and add each repository you want fixed to a Replicas environment. Replicas only accepts fixes for repositories its GitHub integration can reach.
- Replicas organization API key: Ask a Replicas organization admin to create one in Settings → API Keys.
- Sazabi organization admin access: Required to add an organization-level integration in Sazabi.
Connect in the dashboard
- In Replicas, create an organization API key under Settings → API Keys.
- In Sazabi, open Settings → Integrations, select Replicas, and choose Connect.
- Paste the API key. Sazabi verifies the key with Replicas before saving the connection.
- Check the Repositories list on the connection page to confirm Replicas can reach the repositories you expect.
- Optional: open a Sazabi project's Integrations settings, select Replicas, and pick a Default environment for fixes. Under Settings → Code, you can also set Replicas as the project's Default coding agent and turn on Auto-fix new issues above a minimum severity threshold.
Connect with the Sazabi CLI
With the Sazabi CLI installed and authenticated, run the following in Bash. Enter your Replicas API key at the hidden prompt so it is not stored in shell history:
Start and steer a fix
From the Sazabi dashboard, open an issue and select Fix. Pick Replicas if it is not already the project default, confirm the repository, base branch, and environment if prompted, and choose Fix with Replicas. The attempt appears in the issue thread, where you can answer the agent's questions and open the linked pull request.
From the CLI, sign in as a person with sazabi auth sign-in (Fix records the requester and rejects organization secret keys), then dispatch and follow the fix:
If the agent asks a question or you want to steer its approach, reply to or cancel the dispatch directly from the terminal using the dispatch ID printed when the fix started:
Pull requests opened through Fix are linked to the Sazabi issue automatically. If you instead paste an issue's agent prompt into a separate Replicas workspace, include Sazabi-Issue: <ISSUE_ID> in the pull request body or run sazabi issues link-pr "$ISSUE_ID" <pr-url> so the issue tracks the fix.
Query Sazabi logs from a Replicas workspace
When work starts outside Sazabi—from Slack, Linear, GitHub, or the Replicas dashboard—or when an agent working on a Fix wants to check whether an error is still firing, give the workspace direct access to Sazabi.
| Option | Endpoint / interface | When to pick it | Setup in Replicas |
|---|---|---|---|
| Suggested MCP server | https://mcp.sazabi.com/mcp | Fastest way for any coding agent in an environment to call Sazabi tools directly | Open Environments → your environment → Tools, choose Sazabi under Suggested MCPs, and sign in with Sazabi OAuth |
| Native Sazabi plugin | replicas.sazabi.call(...) via @replicas/sdk | When you want workspace scripts, automations, or skills to call Sazabi programmatically | Open Organization → Integrations, install Sazabi, and sign in with Sazabi OAuth |
Neither option is required for the Fix handoff, and you can enable one or both without changing your Sazabi integration settings.
Let the Sazabi agent steer Replicas over MCP
Some investigations start in a Sazabi thread that is not an issue, or need Sazabi's own agent to inspect Replicas environments, read an active workspace's chat history, or trigger an automation. For that workflow, connect Replicas' hosted MCP server (https://api.replicas.dev/v1/mcp) as a Sazabi MCP connector.
- Dashboard: Open Settings → MCP connectors, select Replicas, and paste a Replicas API key.
- CLI: Connect in one command and verify the discovered tools:
Choose the API key scope based on how you want Sazabi's agent to act:
- Organization API key (Settings → API Keys): Acts as the Replicas bot across organization environments.
- Personal API key (Personal → API Keys): Acts as you, including access to your personal environments and automations.
Sazabi also provides a per-connection read-only toggle on the MCP connector if you want Sazabi's agent to inspect workspaces and environments without creating replicas or merging pull requests.
Common setup issues
| What you see | Likely cause | How to fix it |
|---|---|---|
Replicas did not accept this key | The API key is wrong, revoked, or from a different organization | Create a new organization key in Replicas Settings → API Keys and reconnect in Sazabi |
Replicas can't reach any repositories yet | The GitHub integration is missing or the repository is not in an environment | Install GitHub in Replicas Integrations and add the repository to an environment |
| Fix does not offer Replicas | The connection is inactive or the project's repository is not reachable by Replicas | Check Settings → Integrations in Sazabi and confirm the repository appears under Repositories |
signed_in_person_required when running Fix via CLI or API | Authenticated with an organization secret key instead of a personal login | Run sazabi auth sign-in so the fix dispatch is tied to a signed-in person |
| Creating a replica fails from the MCP connector | No coding agent is configured in Replicas | Configure at least one coding agent in Replicas Organization → Coding Agents |
Further reading
FAQ