
Continuous AI: the system that improves itself
Mattias Lyth · 2026-12-02
Most systems get worse over time. Not because anyone does anything wrong, but because nobody has time to keep track. Security is reviewed once a year. Performance problems surface when customers complain. Production errors end up in a log nobody reads.
In Crewrig, our project management tool for construction companies, we have turned that around. Every night a number of AI agents start on their own, each reviews its part of the system and leaves a finished change proposal by morning.
From CI/CD to Continuous AI
Most development teams know CI/CD: every time someone changes the code, it is built and tested automatically. It has become a given.
Continuous AI, a term coined by GitHub, builds on the same idea. The difference is that AI agents do the work, and they can handle what used to require a developer: review security, find the cause of an error, write a fix.
It shouldn't be confused with what is often called the agent loop, meaning how an AI agent works within a task: it thinks, uses a tool, reads the result and continues. Continuous AI is about when the agent gets a task, how often, and what happens to the result.
How it works
- A scheduled job starts the agent. For example, an ordinary cron job.
- The agent gets a fixed task. Each job starts Claude Code with a ready-made instruction, for example
/security-audit. The instruction lives in the codebase and evolves like any other code. - The agent does its work against the latest version of the code.
- The result becomes a change proposal. The agent creates a pull request with the fix, and issues for anything that needs a decision.
- A human reviews and approves.
Four agents, four tasks
In Crewrig we currently run four such routines.
Security, every night. The agent tests the production environment from the outside, without changing anything, much like an attacker would. It goes through new database changes and API routes and checks every dependency against known vulnerabilities. So far, 25 security proposals from the agent have been reviewed and merged.
Support chats, every night. The agent goes through new support chat conversations and connects the questions to the code. If it finds a bug, it proposes a fix. If something is unclear, it creates an issue. When the same question shows up in three chats, or at two different companies, it is prioritised automatically.
Production errors, every morning. New errors are grouped, and the five that affect the most users each get a proposed fix. Errors that come back after a fix are flagged separately.
Performance, every Monday. The agent reads measurements from real users and works out improvements. A different agent, which only gets to see the change itself, assesses the risk. High-risk changes are opened as drafts, so a human has to make an active decision.
What we have learned
Set a time limit. Every run has a ceiling, for example 30 minutes. An agent that gets stuck shouldn't block the next run.
Make sure failures are noticed. Our performance routine once stopped doing anything, without anyone noticing, for several weeks. The folder it read from had been moved. Today the routine stops with a clear error message if anything is missing. A silent agent is worse than no agent, because you think it is working.
Read from a copy, not from production. The performance agent analyses data from a copy of the database that is refreshed every night. It never needs to touch the production environment to do its job.
Treat the instruction as code. When a routine proposes something bad, we fix the instruction, not just the proposal. That way the next run is better.
Why is this new?
Scheduled jobs are not a new idea. What is new is what they can do. Before, a cron job could at most send an alert. Then a developer had to get up to speed, understand the problem and write the code. Now the agent does that work, and the developer's role goes from writing to reviewing.
That changes the economics. What used to be a big clean-up once a quarter becomes a daily routine, and the system gets better every week instead of worse.
How to get started
Start with one routine. Pick an area where you already have data, for example production errors or support tickets. Write the instruction, decide what the agent may do and where the line goes, and let it run once a night. Have a human approve every proposal for the first few months, and give the agent more freedom as it earns it.
Want to know what a first routine could look like in your system? Get in touch.