Coding Agents
Delegate coding tasks to Claude Agent, Cursor, and Devin
Coding agents let you delegate implementation tasks to external AI coding tools directly from the Modem Agent. Instead of switching between Modem and your coding tool, you describe what needs to be built and the agent handles the handoff. You can invoke coding agents from the dashboard (full-screen or sidebar) or from Slack.
Modem currently supports Claude Agent (via Claude Managed Agents), Cursor (via Cloud Agents), and Devin.
How It Works
- You ask the Modem Agent to implement something (e.g., “fix the login timeout bug”).
- Before delegating, the agent queries your Modem data for relevant context: bug reports, user feedback, error patterns, affected user counts.
- The agent composes a task description enriched with that context and sends it to Claude Agent, Cursor, or Devin.
- You approve the action (all coding agent tasks require confirmation before executing).
- The coding agent works asynchronously. You can check on progress through the Modem Agent.
Prerequisites
- For Cursor repository work, the GitHub integration connected in Modem. Devin works in the repositories connected to your Devin account.
- For Claude Agent repository work, the Modem Developer app installed on the repository’s owner. Claude Agent does not need the GitHub integration. See GitHub access.
- An Anthropic organization where you can manage workload identity federation for Claude Agent, a Cursor API key for Cursor, or a Devin API key for Devin
- Admin access in Modem to configure Claude Agent for the organization
Setup
Claude Agent is configured once for the organization and signs in with short-lived tokens, so you give Modem no Anthropic key. Cursor and Devin are configured per user, and their API keys are stored encrypted.
Connect GitHub for repository work
Go to Settings > Integrations > GitHub and connect the repositories you want Cursor to work on. Claude Agent and Devin do not need this step: Claude Agent gets GitHub access on its own settings page, and Devin uses the repositories connected in Devin.
Configure Claude Agent
Go to Settings > Integrations > Claude Agent and connect your organization’s Anthropic account with workload identity federation. Modem checks the sign-in before saving it. To let Claude Agent work in your repositories, install the Modem Developer app on the same page. See GitHub access.
Configure Cursor or Devin
Click your avatar in the bottom-left corner of the dashboard, then click Profile. Scroll to Coding Integrations, click Add API Key for Cursor or Devin, paste the key, and click Add Key.
Start delegating tasks
Open the Modem Agent (full-screen or sidebar) and ask it to implement something with Claude Agent, Cursor, or Devin.
Claude Agent
Claude Agent sessions run on Anthropic’s infrastructure. They can read and write files, run shell commands, install packages, and create pull requests. Their network access is limited to GitHub and common package registries, so they cannot browse the general web.
Connecting your Anthropic account
You need to be an admin in both Modem and your Anthropic organization. Modem’s connect dialog follows the Claude Console’s Connect workload wizard step by step:
- In Settings > Integrations > Claude Agent, click Connect Anthropic, then Open the Claude Console
- In the wizard, choose New provider, then Custom OIDC, and paste the issuer URL from Modem. Leave the JWKS source as OIDC discovery
- In the federation rule step, paste the subject from Modem and choose one workspace. Leave the advanced options as they are
- In the target step, choose New account to create a service account
- Paste the snippet from the wizard’s test step into Modem, which reads the rule, organization and workspace IDs from it, and click Connect. This also completes the wizard’s test
Modem signs in with short-lived tokens. Any organization member can ask the Modem Agent to delegate work to Claude Agent after an admin connects the account. All Claude Agent API usage is billed to the connected Anthropic account.
GitHub access
Claude Agent clones, pushes, and opens pull requests through the Modem Developer app, a GitHub App you install on a GitHub account from Settings > Integrations > Claude Agent.
A session can work in a repository when the app is installed on the repository’s owner and its installation includes the repository. The repository does not have to be connected in Modem’s GitHub integration.
Pull requests and commits are authored by modem-developer[bot], so any teammate can approve them. Each session gets a token that lasts one hour and reaches only the session’s repository.
Installing the Modem Developer app
You need to be an admin in Modem and an owner of the GitHub account you install on: an owner of the GitHub organization, or the personal account itself.
Start from Modem
Go to Settings > Integrations > Claude Agent and click Install app under GitHub access.
Install on GitHub
Choose the GitHub account, then pick all repositories or only the ones Claude Agent should work in. GitHub asks you to authorize the app so Modem can confirm you own that account.
Return to Modem
GitHub sends you back to Claude Agent settings, which lists the account. Repeat for each GitHub account whose repositories Claude Agent should work in.
If you are a member but not an owner of the GitHub organization, GitHub sends your request to its owners instead. GitHub sends the owner who approves it to Modem. The same happens when an owner installs the app from GitHub directly.
Modem connects the app without asking when all of these are true for that owner:
- They are signed in to Modem, and they use the GitHub account that approved the install to sign in to Modem.
- They are an admin of exactly one Modem organization.
- GitHub created the installation in the last 15 minutes.
Otherwise Modem asks them which Modem organization to connect, and they need to be an admin of it. An owner who is not an admin yet can come back once they are, by opening the app’s settings on GitHub and clicking Save.
The app asks for these permissions. Members is an organization permission; the rest are repository permissions. Each session’s token gets only Contents, Pull requests, and the read permissions it needs, and only for the session’s repository.
| Permission | Access | Used to |
|---|---|---|
| Contents | Read and write | Clone the repository and push branches |
| Pull requests | Read and write | Open pull requests |
| Actions, Checks, Commit statuses, Issues | Read | Read CI results and linked issues |
| Members (organization) | Read | Confirm the person installing it is an owner |
| Metadata | Read | Required by GitHub for every GitHub App |
The app has no Workflows permission, so GitHub rejects a push that changes files under .github/workflows/. In repositories the app covers, Claude Agent cannot change GitHub Actions workflows.
Sessions read the app’s token from an Anthropic vault. Modem keeps one vault per repository in the Anthropic account behind your organization’s key, named Modem: GitHub access for owner/repo. Its one credential reaches only that repository, and every session on the repository uses it.
To change which repositories the app covers, edit its installation in the GitHub account’s settings. To stop using it, click Disconnect next to the account in Claude Agent settings: Modem stops using it for new sessions and uninstalls the app from that account. If GitHub does not confirm the uninstall, Modem says so, and an owner uninstalls it in GitHub’s settings.
If GitHub reports an installation suspended when a session starts, Modem marks it Suspended in settings and sessions stop using it. Once an owner restores it on GitHub, the next session uses the app again and the Suspended mark clears.
When the app doesn’t cover a repository
If the Modem Developer app is not installed on the repository’s owner, or its installation does not include the repository, Modem does not start the session. The agent names the repository and the fix: install the app on the repository’s owner with access to that repository.
App tokens last one hour. While a session is running, or was active in the last 24 hours, Modem renews its token and the token in its repository’s vault in the background before they expire, so the session keeps GitHub access while it works even if nobody checks on it. Sending a session a message renews both first, so you can resume a session however long it has sat idle. Once no connected installation of the app covers a repository’s owner, for example after you disconnect the app from that account, Modem deletes the repository’s vault from your Anthropic account.
What Claude Agent can do
- Implement features and fix bugs in any GitHub repository its GitHub access reaches
- Create pull requests with the changes
- Run commands, inspect files, and investigate code paths
- Target a specific repository and branch
- Accept follow-up messages during an active session
Example prompts
Checking session status
The agent returns the session status, timing and token usage when available, and a session ID you can use for follow-up messages.
Cursor
Cursor’s Cloud Agents run on Cursor’s infrastructure. They can implement features, fix bugs, create pull requests, and investigate codebases.
Getting your Cursor API key
- Open Cursor Dashboard → Integrations
- Generate a new API key
- Copy the key and paste it into Modem’s Coding Integrations section
What Cursor can do
- Implement features and fix bugs across your connected GitHub repositories
- Create pull requests with the changes
- Investigate codebases: read source code, trace execution paths, audit implementations
- Target a specific repository and branch
Example prompts
Checking task status
After triggering a Cursor task, you can ask the agent to check on it:
The agent will return the current status, a summary of work done, and a link to the pull request if one was created.
Devin
Devin is an autonomous AI software engineer that handles complex, multi-step implementation tasks. Devin sessions run asynchronously and you can send follow-up messages to provide additional context or redirect its focus.
Getting your Devin API key
- Open Devin API settings
- On the PATs tab, create a personal access token. It starts with
cog_. - Copy the token and paste it into Modem’s Coding Integrations section
Modem runs Devin sessions in the organization the token’s sessions use. A legacy Devin API key (starting with apk_) also works.
What Devin can do
- Handle multi-step implementation tasks across multiple files and repositories
- Create pull requests with the changes
- Investigate codebases: map architecture, audit implementations, report findings
- Accept follow-up messages during an active session
Example prompts
Checking session status
The agent returns the session status, recent messages, and a link to the pull request if one exists. You can also view the session directly on the Devin dashboard.
Context Enrichment
When you ask the agent to delegate a coding task, it automatically considers whether your Modem data can inform the work. For example:
- “Fix the login timeout bug” – the agent queries topics about login timeouts and their sources first, then includes error reports, reproduction details, and user impact in the task description.
- “Address the top complaints from this week” – the agent finds the most-reported issues and provides the coding agent with specific details.
If Modem data reveals ambiguity (e.g., multiple distinct issues matching your description), the agent asks you to clarify before delegating.
You can also skip this by providing full context yourself. The agent only enriches when it would add value.
Troubleshooting
Agent says Anthropic is not connected
Ask an admin to go to Settings > Integrations > Claude Agent and connect the Anthropic account.
Claude Agent sign-in is refused
Check the sign-in in your Claude Console’s authentication history. The federation rule must sit under this organization’s issuer, match
the subject and audience Modem shows, and grant the workspace:developer scope.
Agent says API key is not configured
For Cursor or Devin, go to Profile > Coding Integrations and verify your key is saved and active.
API key validation fails
Make sure you copied the full key. For Cursor, generate a new key at Cursor Dashboard → Integrations. For Devin, create a personal access token under Settings > Devin API > PATs. If it is still rejected, check that your Devin account can create sessions.
Task was triggered but nothing happened
Check the task status through the agent. Coding agent tasks run asynchronously and may take a few minutes to start. If the status shows an error, the coding agent may have encountered an issue with repository access or permissions.
Cursor says your prepaid balance is used up
Cursor charges the Cloud Agents that Modem starts to your account’s prepaid credit, even when your plan has included usage left. Add credit or turn on auto top-up under Usage in your Cursor dashboard, then ask the Modem Agent to try again. See the report on Cursor’s forum.
Claude Agent has no GitHub access to a repository the Modem Developer app is installed on
A session uses the app only when it is installed on the repository’s owner, the installation includes that repository, and it is not suspended. Check the account is listed in Settings > Integrations > Claude Agent, then add the repository in the app’s installation settings on GitHub.
Modem says it couldn't confirm you own the GitHub account
Only an owner of the GitHub account the app is installed on can connect it to Modem. For a GitHub organization, that is one of its owners. For a personal account, it is the account itself. Ask an owner who is also a Modem admin to install it from Settings > Integrations > Claude Agent.
Coding agent can't access my repository
For Claude Agent, make sure the Modem Developer app reaches the repository. See GitHub access. For Cursor, make sure the repository is connected through Modem’s GitHub integration: Cursor can only target repositories that Modem has access to. For Devin, connect the repository in your Devin account.