CloudThinker Makes GitLab Autonomous

GitLab runs pipelines and waits for humans. CloudThinker adds context-aware merge request review, pipeline root cause analysis and a closed loop from incidents back to the MR that caused them, with every state change gated by Auto Mode.

Updated Nov 2, 2026

Cover Image for CloudThinker Makes GitLab Autonomous

CloudThinker Makes GitLab Autonomous

How CloudThinker turns GitLab from a passive code repository into a delivery pipeline that reviews, diagnoses and learns on its own, inside limits you set.


It's 3:17 a.m. Your phone lights up. PagerDuty. Again.

A developer merged a merge request six hours ago: a harmless-looking refactor that passed all unit tests, got a quick "LGTM" from a tired reviewer and sailed through GitLab CI. Inside it were a missing leading slash in a URL path, a subtle security misconfiguration, and a database query that was fine in staging and falls over under production load.

Now the API is returning 500s. The on-call SRE is half-asleep, scrolling through 200 lines of pipeline logs trying to work out what changed. The incident channel fills up with "is anyone looking at this?" and the MTTR clock is running.

That night happens on most teams that run GitLab, and it's why we built the GitLab integration for CloudThinker Review. We didn't want another dashboard or another notification. We wanted GitLab to do some of the thinking.


What "autonomous GitLab" means

The word "autonomous" gets used loosely in AI, so here's the precise version.

GitLab, by design, is a passive platform. It stores your code, runs pipelines when triggered and shows the results. If you configure a CI rule, it enforces it. If you don't, it doesn't. It's powerful, and it waits for humans to review, decide and intervene.

CloudThinker makes GitLab an active participant in delivery. It adds five capabilities GitLab wasn't designed to have:

1. Perception. CloudThinker reads more than the diff. It reads the linked ticket, your convention files and BUSINESS.md, and the Learnings drawn from findings your team already resolved.

2. Reasoning. It doesn't apply static rules. It reasons about code the way a senior engineer would: "This endpoint handles authentication tokens, the error handling is incomplete, and the team's convention file says token errors must fail closed." Underneath, different models handle different tasks, chosen by complexity, latency and cost.

3. Decision-making. Different changes carry different risk, and the review matches it. UI tweaks, copy changes and test additions need light automated checks. New features and business logic get an AI pre-review plus human approval. Security code, infrastructure changes and data migrations get multiple reviewers plus security sign-off. What CloudThinker is allowed to do on its own at each level is set by Auto Mode, covered below.

4. Action. It does more than comment. It suggests specific code fixes, commits them to the branch when someone asks with autofix, and, with Resolve watching production, helps tie post-deployment anomalies back to the merge request that caused them.

5. Learning. Findings your team resolves become Learnings, Review's own memory. That builds an institutional memory that survives team turnover.

The result isn't GitLab with an AI plugin bolted on. It's GitLab with a nervous system.


Why now: vibe coding needs guardrails

AI coding assistants changed the volume of code that reaches review. The quality didn't keep up.

The numbers

The SUSVIBES benchmark is a sobering read on agent-generated code:

  • 47.5% of AI-generated code is functionally correct
  • 8.25% passes security review

Less than half of AI-generated code works correctly. Less than one in ten passes security review. And teams are shipping it faster than ever.

Why traditional review breaks

Human review (read the diff, leave comments, wait for a response, repeat) was designed for developers writing maybe 200 lines a day. With Copilot or Cursor, one developer can produce thousands of lines in an afternoon. The arithmetic stops working:

  • A thorough review of a substantial merge request takes an hour or more
  • Teams now open far more MRs per day than they did two years ago
  • Senior engineers, the ones best equipped to catch subtle issues, are the scarcest resource
  • Review quality drops as volume rises: the "LGTM" problem

Each automated layer covers one slice and misses the same thing.

01CI/CD

Tests pass

Catches syntax errors and failing tests. Says nothing about tests nobody wrote.

02Static analysis

Known patterns

Finds vulnerability signatures it has rules for, one file at a time.

03Human review

LGTM at volume

Thorough on the first MR of the day, a skim by the twentieth.

04The gap

Context

Architecture, team conventions and compliance, the things that make correct code wrong.

What each layer of a GitLab pipeline catches, and what slips between them.

GitLab CI/CD catches syntax errors and test failures. Static analysis catches known vulnerability patterns. Neither catches the contextual issues, the ones that need an understanding of the system's architecture, the team's conventions and its compliance requirements, and of the ways "correct" code can still be wrong.

Between "code works" and "safe to deploy"

Vibe-coding tools help developers write code locally. CloudThinker makes sure what moves forward is safe and compliant for the production environment. The checkpoint is the one GitLab hosts but doesn't actively manage:

Development -> Change Request -> [CODE REVIEW] -> Senior Approval -> Deploy

That code review stage, between a developer's IDE and production, is where CloudThinker sits. It's the last line of defense, so it needs to be context-aware and it can't get tired.


How it works

01Source and CI

GitLabGitLab

  • Merge request eventsOpened, updated, commented
  • Pipeline eventsCompleted or failed, with logs
  • RepositoryDiff, history, surrounding code
  • MR discussionsInline comments, summary, approval status

No Runner changes

02Review and reasoning

CloudThinkerCloudThinker

  • RoutePick the review skills for this MR
  • Build contextTicket, conventions, Learnings
  • ReviewQuality, security, infra, operations
  • LearnFindings and outcomes written back

Reads through the GitLab API

03Where the team works

Same places

  • GitLabThe merge requestSeverity-ranked findings with fixes
  • SlackSlack or TeamsPipeline RCA, approval links
  • PagerDutyOn-callIncidents linked to the MR that caused them
  • JiraFollow-ups with evidence

No new dashboard

GitLab sends webhooks; CloudThinker reads through the API and answers in the merge request.

The architecture is a 14-stage execution pipeline, a set of specialized review skills, and a closed loop that connects code review to incidents and infrastructure. Here's a merge request's path through it.

The GitLab connection

CloudThinker uses GitLab's native webhooks and API. When a developer opens a merge request, GitLab fires a webhook event that CloudThinker receives. A merge request hook payload carries everything needed to start (trimmed):

{
  "object_kind": "merge_request",
  "event_type": "merge_request",
  "project": { "id": 482, "path_with_namespace": "acme/accounts-web" },
  "object_attributes": {
    "iid": 1197,
    "action": "open",
    "source_branch": "refactor/account-nav",
    "target_branch": "main",
    "last_commit": { "id": "9f3c2e1" }
  }
}

The integration works both ways:

  • Inbound: MR opened, updated, pipeline completed, comment added
  • Outbound: review comments posted, approval status updated, pipeline stages triggered, merge blocked or approved

There are no GitLab Runner changes and no custom CI scripts. CloudThinker works as a middleware layer that adds to GitLab's native capabilities without replacing them.

Routing: deciding what this MR needs

The event reaches a router, which classifies intent and selects skills:

  • Is this a code change that needs review? Run the Code Review skill.
  • Does it touch infrastructure configuration? Add the Security Audit skill.
  • Does the repository have convention files or a BUSINESS.md? Load them as review context.
  • Has the team resolved similar findings before? Apply those Learnings.

Routing is automatic. Nobody has to @mention anything.

Context building: what the model sees first

This is where CloudThinker differs most from other code review tools. Before a model reads a single line of the diff, CloudThinker assembles the context:

  • Working memory: the current diff, commit messages, branch metadata, pipeline status and any inline discussion.
  • Ticket and conventions: the linked ticket, your convention files and BUSINESS.md, so the review knows what the change is for and which rules the team follows.
  • Learnings: conventions drawn from findings your team already resolved on this codebase.

The routing layer then picks a model per sub-task, balancing accuracy, speed and cost on each call.

This context stage is what makes convention-aware review possible: a pattern the team already fixed once doesn't ship twice.

The 14-stage execution pipeline

Every review request runs through the same 14 stages:

  1. Intent detection: classify the MR event and the skills it needs
  2. Guard-in: safety checks for PII, injection and schema validity
  3. Skill selection: choose the review skills (Code Review, Security Audit and so on)
  4. Context building: assemble the diff, the linked ticket, convention files and Learnings
  5. LLM routing: pick the model for each sub-task by complexity, latency and cost
  6. Code fetch: read the changed files and the surrounding code from GitLab
  7. Pre-hook: apply team-specific review configuration and quality thresholds
  8. Tool execution: run the analysis itself, including AST parsing, dependency checks and pattern matching
  9. Chain: if the review finds infrastructure concerns, hand off to an infrastructure or security review skill
  10. Guard-out: check that review comments are constructive, actionable and correctly formatted
  11. Event log: record the full review trace for audit
  12. Evaluation and tracing: an LLM-as-judge scores the quality of the review itself
  13. Learnings: record the findings your team resolves so future reviews apply them
  14. Deliver: post the review to GitLab as inline comments, a summary and a verdict

Every stage is logged, traceable and auditable, which enterprise environments need, especially regulated ones like banking.

The review: one supervisor, several specialists

A merge request doesn't go to one generic reviewer. A supervisor reads the intent, assesses the scope and risk, and dispatches specialist reviews for each dimension of the change. An MR that touches API routes, database queries and Kubernetes manifests gets a code quality review, a security review, an infrastructure review and an operational readiness review, and the supervisor merges them into one.

The developer sees one review, not four bots commenting separately. The supervisor resolves conflicting recommendations, ranks findings by actual risk and gives a clear verdict. The review covers:

  • Performance. N+1 queries, unoptimized loops, missing indexes, memory leaks and concurrency issues, found by reasoning about execution paths rather than static pattern matching.
  • Security. Vulnerability detection aligned with compliance standards. For banking clients, that means alignment with regulations like Vietnam's Circular 09. It catches SQL injection, XSS, insecure deserialization, broken authentication and sensitive data exposure.
  • Correctness. Beyond "does it compile": does the code do what the commit message says? Are edge cases handled and error paths complete?
  • Architecture. Does the MR introduce coupling that crosses the project's boundaries? Does it follow established patterns, or introduce new ones without documentation? Will it change infrastructure topology downstream?
  • Operational readiness. Is the change observable, with enough logs and metrics? How will it behave under production load? What's the blast radius if it fails?
  • Severity classification. The supervisor deduplicates overlapping findings and classifies each one as Critical, High, Medium or Low, with a specific remediation. Not "fix this" but "here's the corrected code."

On our benchmark of 37 real-world bugs, this approach reached an 81% bug detection rate, ahead of Greptile (78%), Cursor (54%), Copilot (48%), CodeRabbit (46%) and Graphite (8%). The benchmark write-up has the method.

CloudThinker code review on a real merge request, showing review coverage, architecture diagrams and change analysis
CloudThinker code review on a real merge request, showing review coverage, architecture diagrams and change analysis

The LeaderBoard: making quality visible

CloudThinker also tracks quality over time with a LeaderBoard. Each developer gets a quality score on a 1 to 10 scale that balances code quality with productivity, based on:

  • The severity distribution of findings across their MRs
  • How they respond to review feedback
  • The trend over time, improving or declining
  • Consistency across different types of change

Developers see their scores rise as they absorb the recommendations. Engineering managers see team-wide quality trends without micromanaging individual reviews.

Pipeline failure root cause analysis

When a GitLab CI/CD pipeline fails, most teams start the same loop: read the logs, trace the error, find the cause, fix it, push again. CloudThinker takes the first half of that loop:

  1. The pipeline failure event arrives through the GitLab webhook
  2. CloudThinker reads the full job log, not just the last error line
  3. It checks memory: has this failure pattern happened before, and what fixed it?
  4. It correlates the failure with recent merge requests, infrastructure changes and dependency updates
  5. It posts a root cause analysis on the MR, with a suggested fix

Starting from the possible readings matters here. A red pipeline is usually one of four things: the change itself broke a test, a dependency moved underneath it, the runner or environment is unhealthy, or the test is flaky. They predict different evidence. A real break fails the same way on retry and only on this branch. A dependency drift shows up as a version change in the lockfile or a new image digest. A runner problem fails across unrelated projects at the same time. A flaky test has passed and failed on the same commit before. CloudThinker checks each against the job log and history, and only then names a cause. Reading the job log is a plain API call:

curl --header "PRIVATE-TOKEN: $GITLAB_TOKEN" \
  "https://gitlab.example.com/api/v4/projects/482/jobs/90311/trace"

GitLab CI goes from "your build failed, figure it out" to "your build failed because of X, here's the fix, and here's the MR that introduced it."

The closed loop: from review to incident prevention

The most valuable part of the integration isn't any single feature. It's the loop that connects them.

01Prevent

Review

Catch the bug in the merge request, before it becomes an incident.

02Monitor

Watch the deploy

Tie a CPU spike or error-rate jump to the MR that shipped it.

03Diagnose

Root cause

Correlate alerts with commits and infra events to name the change.

04Learn

Memory

The resolution shapes the next review of a similar pattern.

The closed loop: each incident makes the next merge request review sharper.

Prevent. Code is reviewed before deploy, so bugs are caught before they become incidents, with scrutiny matched to each change's risk.

Monitor. After deploy, infrastructure health is watched for anomalies from the new code. If a deploy causes a CPU spike, a memory leak or a jump in error rate, it's correlated with the specific MR.

Detect and diagnose. When an incident happens, alerts are correlated with code changes and infrastructure events for fast root cause analysis. The answer names which commit caused it.

Resolve and learn. Resolve keeps incident memory of each fix, and the lesson can become a rule in your convention files. The next time a similar pattern shows up in a merge request, the review flags it before it merges.

That loop is what makes GitLab autonomous. It works less like a point solution and more like an immune system: each infection teaches it to stop the next one.


One merge request, end to end

Here's a real review, the kind that happens dozens of times a day in any organization running GitLab.

10:14 a.m. A developer opens a merge request that refactors the account settings page, consolidating five separate pages into one view with tab-based navigation. 27 files changed. The title: "refactor(routes): update return URLs and action links to consolidate account navigation."

10:14 a.m., seconds later. CloudThinker receives the webhook. The router classifies it as medium risk: a UI refactor with route changes. Context building pulls the repository's architectural patterns, the author's review history and any incidents related to routing changes.

The review starts from what a route consolidation can break. Links that still point at the old pages. Permission checks that lived on the old routes and didn't move. Return URLs that resolve relative to the new location instead of the root. Query parameters the new tabs parse differently. Each one is a specific thing to check across the 27 files.

10:15 a.m. The review is posted to GitLab as inline comments:

  • Review score: 8/10
  • Review coverage: 27 files analyzed
  • Findings: 0 critical, 0 high, 1 medium, 1 low
  • Security: OK. No security issues, permission checks in place, no injection risks
  • Performance: OK. Clean refactor with no regressions
  • Navigation consolidation: OK. Settings cleanly merged into one account page

The medium finding is exactly the third reading above: a missing leading slash in a URL path. action_url in quota_monitoring_service.py uses a relative path instead of an absolute one. The low finding is the fourth: a parsing function in referrals-tab-content.tsx can return NaN for invalid URL parameters.

Verdict: CONCERNS. One medium issue should be fixed before merge.

10:16 a.m. The developer fixes both. CloudThinker re-reviews and approves. Total elapsed time: 2 minutes.

10:17 a.m. The LeaderBoard updates. The author's score reflects a clean refactor and a quick fix.

A missing slash is the same kind of bug as the one behind the 3:17 a.m. page at the top of this post. This time it surfaced as a review comment, not a page.


Why this beats the traditional workflow

Traditional GitLab workflowWith CloudThinker
First reviewWhen a reviewer is free, often hours laterWithin minutes of the MR opening
ContextWhat the reviewer remembersThe ticket, conventions, BUSINESS.md and Learnings
CoverageWhoever reviews, whatever they knowPerformance, security, correctness, architecture, operations
Pipeline failuresRead the log, guess, push againRoot cause and fix posted on the MR
Post-deploy incidentsTraced back to a commit by handCorrelated with the MR that shipped it
KnowledgeLeaves when people doKept as Learnings and conventions, and reused

The deeper difference is that the traditional workflow treats review, CI and incident response as separate steps owned by separate people. CloudThinker treats them as one loop, so what's learned at 3 a.m. shows up in the next morning's review.


Auto Mode: trust earned, not assumed

A common objection is "I don't trust AI to make merge decisions." That's reasonable. CloudThinker reads freely (diffs, pipelines, history) and posts its review and recommendation with reasoning. Writes it makes on its own go through Auto Mode, so you decide what runs on its own and what waits for approval. Autofix is the exception you trigger yourself: @cloudthinker-ai autofix commits fixes to the MR's source branch, and autofix stacked opens a separate MR so you can read the fixes first. Your security-critical banking middleware can keep a person on every merge.


The infrastructure: enterprise-grade execution

CloudThinker separates customers, teams and execution in a three-tier model:

Organization (tenant boundary). Each customer runs in a fully isolated Organization with SSO/SAML, RBAC policies, billing, audit logs and user management. No data crosses Organization boundaries.

Workspace (project or team isolation). Inside an Organization, teams create Workspaces to separate their work. Each Workspace has its own knowledge base, skill configuration, permissions and connection credentials.

Sandbox (execution). Agent commands run in CloudThinker's Sandbox, and connection credentials are injected there only when a command runs.

For enterprise deployments, dedicated and self-hosted options (early access) run inside your own network, connected over Direct Connect, ExpressRoute, Cloud Interconnect or VPN. The Connections post covers the network options for CloudThinker Cloud.

The security posture: credentials encrypted at rest, TLS in transit, BYOK (Bring Your Own Key) on Scale and above so customers can use their own model keys, and SOC 2 Type II.


The bigger picture: from AIOps to Frontier Investigation Agents

The GitLab integration is one part of a larger direction: the move from traditional AIOps (dashboards and recommendations) to Frontier Investigation Agents that investigate, act inside limits you set, and learn.

The loop is the same everywhere: perceive, correlate, hypothesize, act, learn. Code review is where a change is perceived and questioned. Incident response is where it's correlated and acted on. Memory and Learnings carry the lesson forward. GitLab is the connective tissue between them.

When we say CloudThinker makes GitLab autonomous, we don't mean GitLab runs without humans. We mean it runs with intelligence: it sees context people miss, reasons over history, decides on evidence, acts inside the limits you've approved, and learns from every outcome.

The 3 a.m. pages don't have to be inevitable. The code that causes them can be caught before it merges, and the fix for each one can be kept and reused.


Getting started

1. Connect GitLab. CloudThinker integrates in minutes, with no Runner changes and no workflow changes. The setup guide has the steps.

2. Open a merge request. The review arrives on the MR automatically. Nothing changes state until you approve it.

3. Ask about your pipelines from chat.

"Look at the last 20 failed pipelines on main in acme/accounts-web. Group them by root cause, tell me which ones were flaky tests, and propose a fix for the most common real failure. Propose only, change nothing."

4. Let one narrow class run on its own once you trust the reviews.

"For the docs-site repository only, approve merge requests that change nothing but Markdown files once the pipeline is green. Everything else still comes to a reviewer."

Start your free trial or book a demo to see the review on your own repositories.


Related reading


Sources and references

About the author

ST

Steve Tran

Founder & CTO, CloudThinker

Steve Tran is the founder and CTO of CloudThinker, which builds Frontier Investigation Agents for production cloud operations. He writes about incident investigation, cloud cost, and the practices teams use to safely run autonomous AI agents against production AWS, GCP, and Azure environments.

gitlabautonomousdevopscodereviewvibeopscicddevops