Menu

GitLab CI as the merge gate: the coding agent tests on its own machine

DEV Community: gitlab·Sandscale·3 days ago
#PwanNqu8
#devtogitlab#devto#dev#agent#merge
Long article (1193 words) — no AI summary yet.
Reading 0:00
15s threshold

When a team first lets Claude Code, Codex or Cursor work on a GitLab repository, a tempting pattern appears. Nobody wants the agent running tests on a developer's laptop, so the agent pushes a commit, a merge request pipeline runs, the agent reads the job log, edits, and pushes again. GitLab CI becomes the agent's test runner.

It works, in the sense that the tests do run somewhere other than a laptop. It is the wrong loop. This post is about the split that holds up: the agent runs the tests for the code it just changed on its own machine, and GitLab CI stays the merge gate. The GitLab behaviour comes from GitLab's own docs on merge request pipelines and merge checks , read on 2 December 2026. Sandscale commands are from CLI 1.4.1.

This is the GitLab version of a split we have already described in general terms in why the edit-test loop should not wait on CI .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.