Inkitt uses an event-driven orchestrator to write pull requests automatically
Agi Letkiewicz Tanner, chief engineer at Inkitt, described a one-shot PR creator on the company's engineering blog. It receives tasks from Slack, Linear or another agent's API call, and on remote infrastructure it automatically handles requirement specification, implementation, verification, CI failure fixes and merge conflict resolution, ending in a draft PR. An event-driven orchestrator coordinates short-lived agent containers and persists each run's state to a database, so an interrupted run can resume from the recorded state. For security, the orchestrator holds external credentials centrally, while agent containers receive only short-lived repository tokens and model credentials; a separate check reads the actual Git diff to confirm changes did not touch restricted paths. Tasks involving database migrations, schema or shared contract changes, CI and container build configuration, authentication, payment code, or package additions and removals are rejected outright. Verification, CI fixes and merge conflict resolution each get at most two attempts. Tanner said idempotency, locks, retry budgets and permissions are the hard parts, and "the model is actually the simplest part". The system only creates draft PRs; it cannot bypass branch protection or merge on its own, and a human must still mark a PR as ready for review and approve it.
Coding agents are usually started locally by a developer who watches them run, and once a task drags on or CI breaks, a person has to step in. Inkitt's approach puts the agent in a remote container and manages the whole lifecycle with an orchestrator, so the trigger becomes sending a Slack message or opening a Linear ticket.
For teams that want to build a similar flow themselves, the reusable conclusions from this design are: separate decision logic from side effects; give credentials only to the orchestrator and short-lived tokens to agent containers; deduplicate webhooks that may be delivered more than once and use conditional writes; and cap retries instead of looping forever. The cost is that the scope is kept very narrow — changes touching databases, payments, authentication and build configuration are not accepted at all, and the output is only a draft PR, so the human review step cannot be skipped.