I gave Devin’s SWE-2.1 four jobs on a multi-tenant Laravel app, the kind of work a SaaS team does every week: billing, a data leak between customers, background jobs and plan limits. Enterprise apps are hard on coding agents, because one slip can show a customer someone else’s data. SWE-2.1 got through all four jobs with the whole Pest suite green, and every run is recorded below, prompt included.
SWE-2.1 is Cognition’s in-house coding model, and it’s free in Devin CLI and Desktop through 8 December. I covered the launch in Cognition releases SWE-2.1. This time I wanted to see it do real work on a codebase with the awkward parts built in: separate databases per customer, queues, caches and roles.
The app
It’s a Laravel 13 project tracker with three customers: Acme on the enterprise plan, Globex on business and Initech on starter. Each customer gets its own database, picked by the domain the request arrives on, using stancl/tenancy. Users have roles, time entries roll up into project budgets, and the tests run on Pest.

Multi-tenancy is where Laravel apps go wrong quietly, so it’s a fair test. stancl/tenancy is the package that gives each customer a database of their own. Spatie’s laravel-multitenancy is the other widely used option, and it supports both single and multiple databases. Whichever you pick, the same traps turn up: caches, queues and jobs that don’t know which customer they belong to.
The repo’s AGENTS.md tells agents to install Laravel Boost before they start. Devin read it and did exactly that, then worked from the Laravel and testing guidelines Boost put in the project. All four runs were hands-off: I gave Devin permission to read, edit and run shell commands up front, typed the prompt and left it alone. The box was 4 cores, 16 GB RAM, Ubuntu 24.
The app, running
The app is API-only, so to watch it work I wrote a small viewer page that calls the app’s real endpoints in a browser and shows what comes back. SWE-2.1 didn’t write the viewer, and every number on screen comes from the running app. The browser clips below all use it, with each tenant on its own domain.

Invoicing from one prompt
The first job is the biggest: a whole feature, from migration to policy to endpoint to tests, in one go. The prompt, verbatim:
Add invoicing to this multi-tenant app. Tenants bill clients from a project's unbilled billable time entries. Add a tenant migration for invoices and invoice_lines (status draft, sent or paid; an invoice number unique per tenant like INV-0001; totals in cents), the models and an InvoiceStatus enum, an InvoicePolicy where owners and admins can create and send invoices and members can only view them, a POST /api/projects/{project}/invoices endpoint that snapshots the unbilled billable time entries into lines and marks them as invoiced so they can never be billed twice, and a GET /api/invoices endpoint. Write Pest tests, including one proving tenant A can never see tenant B's invoices, and keep going until the whole suite is green.
SWE-2.1 finished in about two and a half minutes with ten tests passing, seven of them new. It covered the double-billing rule, numbering that increments per tenant (INV-0001, then INV-0002), 403s for members who try to create invoices, and tenant isolation checked both over HTTP and directly against each tenant’s database. At Medium this full prompt ran past the ten minutes I allow for a recording, so this run is at Low, and Low was plenty.
Here’s the same job in the browser. Billing a project creates INV-0001 with its two billable lines, $300 in total. A second click on the same project is refused with a 422, and Globex gets its own INV-0001 in its own database.


The dashboard that showed the wrong company
For the second job I planted a bug on purpose. The dashboard caches its summary for five minutes, but under one shared key, so whichever customer opens it first fills the cache for everyone. It’s a classic multi-tenant leak, and it only shows up when two customers hit the dashboard close together. I told Devin the symptom and nothing else:
Customers at two different tenants report that the dashboard at /api/dashboard sometimes shows another company's numbers. Reproduce it with a failing Pest test first, find the root cause, fix it properly without just turning the cache off, and make sure the new test and the rest of the suite pass.
It did it in the order I asked. SWE-2.1 wrote a regression test with two signed-in tenants and confirmed it failed, with Globex receiving Acme’s cached numbers. It named the root cause, the shared dashboard.summary key, and fixed it by putting the tenant’s key into the cache key while keeping the five-minute cache. The full suite ended at five tests passing. The run took about five and a half minutes at Medium.
In the browser, the same two page loads show the difference. Before the fix, opening Globex’s dashboard after Acme’s shows Acme’s numbers under Globex’s name. After it, Globex sees its own.



Queued reminders that run in the right tenant
Queues are the other classic trap. A job picked up by a worker has no web request to tell it which customer it belongs to. I started from the app as the invoicing run left it and asked for overdue-invoice reminders:
Add a queued SendInvoiceReminder job and an artisan command invoices:remind that finds every tenant's sent invoices older than 14 days and queues one reminder per invoice. The job must run inside the correct tenant when a queue worker picks it up, and log the reminder through the Log facade. Write a Pest test that proves the job runs in the right tenant and never touches another tenant's data, then run the suite until it is green.
This one took about eight and a half minutes at Medium and ended at twelve tests passing. SWE-2.1 added the job and the command, then tested the part that matters with a real queue:work --once run, which confirmed the worker initialises the correct tenant. It also tested invoices with colliding IDs in two tenants, so a reminder for Acme’s invoice 1 can’t read Globex’s invoice 1.
The unexpected part: SWE-2.1 noticed that jobs dispatched inside a tenant’s context were being stored in that tenant’s database, where no worker would ever look. It changed the database queue to use the central connection. I hadn’t asked for that, and it’s a genuine fix. The longer version of this prompt, which also scheduled the command daily, ran past my ten-minute limit, so this is the trimmed one.
In the browser, I added three overdue sent invoices to the test data, two for Acme and one for Globex, then clicked once. The reminders command and a queue worker ran, and all three reminders went out, each logged against its own tenant.


Per-plan limits
The last job is the kind of product rule every SaaS ends up needing: limits that depend on the customer’s plan. I started from the app as the cache fix left it.
Add per-plan limits: starter tenants may have at most 3 active projects, business tenants 10 and enterprise tenants unlimited. Enforce it in a way that is easy to extend (a PlanLimits class or an enum-backed config), return a 422 with a clear message when the limit is hit, include the remaining project allowance on the dashboard, and add an artisan command tenants:usage that prints a table of every tenant's plan, active projects and limit. Write Pest tests for each plan and run the whole suite until it is green.
SWE-2.1 took about five and a half minutes at Medium and finished with twelve tests passing. It built an enum-backed plan config with a small PlanLimits class, so adding a plan means adding one entry. Creating a fourth project on a starter plan now returns a 422 with a plain message, the dashboard reports how many projects each customer has left, and tenants:usage prints the table. It also decided on its own that archived projects shouldn’t count towards the limit, and tested that.
In the browser, Initech on the starter plan is refused a fourth project with a 422 and a plain message, while Globex on the business plan adds one and sees 6 of 10 left.


The four runs side by side
| Job | Level | Time | Tests passing at the end |
|---|---|---|---|
| Tenant invoicing | Low | About 2.5 minutes | 10 |
| Dashboard cache leak | Medium | About 5.5 minutes | 5 |
| Queued reminders | Medium | About 8.5 minutes | 12 |
| Plan limits | Medium | About 5.5 minutes | 12 |
What stood out is how little steering any of it needed. Each run read the repo’s rules, planned its steps in a checklist, wrote tests before and after changing code, and kept going until the suite was green. It picked the right tool for the stack each time: Pest conventions, tenant-aware queue handling, policies for roles. On an enterprise codebase, that’s what counts. It respected the tenant boundary in every job, tested the risky paths and finished with the suite green.
Where SWE-2.1 sits in Devin
Cognition trained SWE-2.1 with reinforcement learning on top of Kimi K3, and it’s the model behind Devin CLI, Devin Desktop and Devin in the cloud. On Cognition’s own numbers it scores 41.3 on FrontierCode 2.0, up from 24.1 for SWE-2, and 50.0 on Terminal-Bench 4.1, up from 24.2. The full benchmark table is in my launch write-up and in Cognition’s post.
In the CLI, pick it with /model or start Devin with --model swe-2-1. It comes in five reasoning levels from Low to Max, and all five show as free in the CLI’s model list. The faster Lightning versions are priced per token. I used Low and Medium here, and plain swe-2-1 gives you Medium.

Cognition’s launch post says SWE-2.1 is free through 8 December on Desktop and the CLI, then available in Desktop, Cloud and the CLI at a discounted price until 30 January. Plans and prices are on Devin’s pricing page. If you’ve got a Laravel app and a few days left, this is a cheap way to find out what an agent does with your own codebase. It also sits alongside Devin’s Laravel migration credits.
Sources
- Cognition, SWE-2.1
- Devin pricing
- Tenancy for Laravel (stancl/tenancy) docs
- Spatie laravel-multitenancy docs
Disclosure: I’m an OpenAI, Firecrawl and Devin ambassador.




