Turning Linear tickets into GitHub PRs with an autonomous agent

· 5 min read · Updated · Sinatra

How Sinatra turns a Linear ticket, GitHub issue or Slack thread into a reviewed pull request: the workflow, the sandbox, mid-run steering, and your controls.

On this page

Every team has a backlog of small, well-defined tickets. "Add pagination to the users endpoint." "Fix the timezone bug in the export." "Write tests for the retry helper." None of them are hard. All of them cost a context switch: you stop what you're doing, load the repo back into your head, make the change, wait for CI, open the PR.

Sinatra does that part for you. You hand it a Linear ticket, a GitHub issue or a Slack thread, and a few minutes later there's a pull request waiting for review. Here's what happens in between.

The short version

You hand it an issue. Sinatra reads it, opens a branch and a draft pull request, writes the code, and runs your tests. You review that PR the way you'd review a teammate's. If something's off, you leave a comment and it revises.

And the PR isn't the end of the task. You can reply while it works, after it opens the pull request, and after you merge, and it picks up from there.

That's the whole loop. Everything below is just detail.

Handing the agent a ticket

In Linear, assign the issue to Sinatra the same way you'd assign a person, or mention @sinatra in a comment. On GitHub, add the Sinatra label to the issue. Sinatra provisions the label on the repos you enable.

Slack works too, once an owner or admin connects it from workspace Settings. Mention @Sinatra in a channel and it works in that thread, posting its progress and its answer there. A thread doesn't name a repository the way an issue does. If the workspace has more than one, the agent picks from what you asked, so add repo: owner/name to the message to be sure.

Wherever it starts, the request is the spec. A clear title and a couple of sentences of context are usually enough. If the ticket is vague, Sinatra asks questions or proposes a plan before it starts writing, so you can correct it early instead of after the code exists.

What happens in the sandbox

Once it picks up the issue, Sinatra starts an isolated sandbox and checks out your repository into it. Everything from here on happens in that sandbox, not on your machine and not on your main branch.

Inside, it works the way you would:

  • reads the parts of the codebase the ticket touches
  • creates a branch
  • makes the change
  • runs the test command you've configured

If the tests fail, it reads the failure and tries again before it asks you to review. When the run finishes, the sandbox is stopped and kept for follow-ups on the same task, so the next reply usually picks up with the checkout as it was left.

Reviewing the pull request

Sinatra's pull request opens as a draft while it works. When the work is done, it reviews its own diff and marks the PR ready for review, with a description of what it changed and why. From your side it looks like any other PR: a diff, a description, and check results.

You review it. If it's good, you merge it. If it isn't, you leave a review comment ("use the existing helper instead of a new one," say, or "this needs a test for the empty case") and reply to Sinatra in the thread. It picks the comment up and pushes a revision to the same branch. You are never handed a black box. You get a diff you can read and change.

You also don't have to wait for the PR to change course. Reply while it's still working, in the Linear agent session, on the GitHub issue or in the Slack thread, and the message reaches the running agent. Sinatra decides whether it applies right away or as a new agent once the current one hands back. That holds for both engines it runs, Claude Code and oh-my-pi.

Starting a task without a ticket

Some work never becomes a ticket. The sinatra CLI starts a task from your terminal (sinatra "fix the flaky retry test"), and if you run it inside a git checkout whose repository is connected to your workspace, it works on that one. Sinatra is also a remote MCP server, so Claude Code, Cursor, claude.ai or ChatGPT (on Business, Enterprise or Edu plans that allow custom MCP servers) can hand it a task mid-conversation once you've signed in through the browser. Your own scripts can do the same over the HTTP API with a personal access token.

These tasks get the same sandbox and can open the same kind of pull request. Their conversation lives in Sinatra: you read the answer and reply with sinatra show and sinatra reply or from the MCP client, and the task's page in the dashboard shows it too. One difference: a message you send while the agent is working doesn't reach it. It waits and starts the next agent. The CLI, MCP and API docs have the setup for each.

Using your own models and keys

You choose the model. Bring your own Anthropic (Claude) or OpenRouter key, or connect a Claude, ChatGPT or SuperGrok subscription you already pay for, and Sinatra runs the work on it. Your keys are stored encrypted and used only to run your tasks.

Sinatra never bills for model usage: that's between you and your provider, and your code goes through your own provider under your terms.

Where you stay in control

A few things keep this from turning into a free-for-all:

  • The pull request is the gate. Nothing reaches your main branch until a person merges it.
  • Scope stays on the ticket you assigned. Sinatra keeps the change focused on what was asked.
  • The behavior is yours to set. A small .sinatrarc.json file in your repo controls the model, the test command, and how the sandbox is set up.

Checked into your repo, that config can be as short as this:

{
  "hooks": { "test_command": "pnpm test" },
  "sandbox": { "env": { "NODE_ENV": "development" } }
}

When it's a good fit

Sinatra earns its keep on tickets that are clear but tedious: bug fixes with a known cause, small features, missing test coverage, mechanical refactors, dependency bumps. It frees you to spend your attention on the design work and the hard calls that actually need a person.

Assign it the next small ticket in your backlog and see what comes back. The short product version of this workflow is on the Linear tickets to PRs page. You can start for free, or read the docs to wire up your repo.

Assign the issue. Come back to a PR.

Sinatra picks up work from Linear, GitHub and Slack and opens a draft pull request for your team to review. Bring your own Claude or Codex access; Sinatra never bills for model usage.