Devin
Connect
Connect Devin from the terminal. Pass --help for the flags Devin accepts.
polylane integration connect --type devinA service user token from Devin API → Service users in Devin.
Connect Devin to let Devin write the fixes that Polylane finds. Polylane investigates the issue and confirms the root cause. Devin writes the change and opens the pull request on your GitHub. You use your own Devin API access, so your Devin plan must include it.
- In Devin, go to Devin API → Service users and create a service user.
- Copy its token. The token starts with
cog_. - Paste the token into Polylane. Polylane finds the Devin organization of the token.
When you connect Devin, it becomes the executor for every autofix of the workspace. To send autofixes back to Polylane's own agent, turn off Use Devin for all autofixes on the Devin integration page in Settings.
Polylane encrypts the token before it stores it, and the agent never sees it.
How it works
Polylane hands the fix to Devin
When a fix run confirms the root cause of an issue, Polylane writes a brief for Devin: the root cause, the change to make, and how to check it. Every brief tells Devin to run the typecheck, the lint and the tests of the repository, and to list each check in the pull request description. A fix from a chat thread also gives Devin the change that Polylane wrote in its sandbox.
Before Devin starts, Polylane applies the same gates as for its own fixes: the autofix switch, the autofix quota, a fix already in progress, and an open pull request for the same fix. Then Polylane starts one Devin session on the repository, with the brief as the prompt.
Code hosts
Devin works only with GitHub repositories. For a repository on GitLab, Polylane writes the fix in its own sandbox.
The pull request comes back
Polylane reads the session every five minutes, for a maximum of six hours. When Devin asks a question, Polylane tells it to continue on its best judgment. Polylane does this two times. If Devin asks a third time, the run stops.
When Devin opens a pull request, Polylane records it on the autofix. Polylane also adds a section to the description with its evidence and the history of the fix. Devin creates the pull request itself, so the workspace setting for draft pull requests does not apply. If the session ends without a pull request, Polylane records the autofix as skipped.
When a run fails
If the session fails, stops, or does not finish in six hours, Polylane's own agent takes the fix and writes it. A run that opened a pull request always counts as a success.
If Devin refuses the token, Polylane sends one notice and gives new fixes to its own agent. Reconnect or verify the integration to give fixes to Devin again.
Give Devin Polylane's MCP tools
A Devin session can read Polylane while it writes a fix: issues, investigations, the infrastructure graph and observability data. Add the Polylane MCP server to Devin:
- In Polylane, open Settings → Coding agents and create an API key. The key gets every read scope that the MCP tools check, plus edits to Polylane's own data. It cannot act on your cloud or on connected providers.
- In Devin, go to Settings → Connections → MCP servers and click Add a custom MCP. This needs the Manage MCP Servers permission.
- Choose the Streamable HTTP transport and set the server URL to
https://mcp.polylane.com/mcp. - Set the bearer token to the API key from step 1. Devin sends it as
Authorization: Bearer <key>.
Troubleshooting
When a Devin run fails, Polylane's own agent writes the fix. To let Devin do the next fix, correct the cause:
| What Polylane reports | What to do |
|---|---|
| Devin reached its usage limit | Examine your Devin plan or usage. |
| Devin needed more input than the task gave | Make the instructions of the fix more specific. |
| Devin did not finish in the time limit | Give Devin a smaller task. |
| Devin refused the token | Create a new service user token and reconnect Devin. |
Disconnecting
Disconnect Devin in Polylane, then revoke the service user token in Devin. After you disconnect, Polylane's own agent writes new fixes.
Disconnect
Disconnecting stops every sync and check and deletes the credentials Polylane held. Everything Polylane set up in Devin is removed as well; nothing is left behind.
polylane integration disconnect <id>