Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Why a coding agent's edit-test loop should not wait on CI

There is a pattern that shows up when a team first lets coding agents work on real repositories without running them on anyone's laptop. Nobody wants the agent running tests on a developer's machine, so the agent pushes a commit, CI runs, the agent reads the result, edits, and pushes again. CI becomes the agent's test runner. It works, in the sense that the tests do run somewhere safe. This post…

When a team first allows coding agents to work on real repositories without running them locally, a pattern emerges. The agent commits code, CI runs the tests, the agent reads the results, edits the code, and pushes a new commit. CI becomes the agent's test runner. This loop works, but it's not the best approach. Here's why it's the wrong loop and what to do instead.

Every iteration in this loop incurs the entire pipeline cost. An agent's loop consists of many small steps: changing one function, running its tests, and reading one failure. CI runs, however, are designed for a different purpose: checking out the code, installing dependencies, building the project, running all the tests, and reporting the results. When an agent needs the answer to just one test, it must wait for the entire pipeline to complete, plus any waiting in queue.

The feedback from CI is harder to read. On their own machines, agents run commands and read the output directly. Through CI, they must locate the run, fetch logs via an API or CLI, and sift through human-readable output to find the failure. Agents are proficient in many areas, but parsing CI logs reliably is not one of them. This process introduces unnecessary noise and makes the reviewer's job more difficult.

Furthermore, the history of these iterations fills with unnecessary noise. Commits like "fix test", "try again", and "fix lint" clutter the branch and sometimes the pull request everyone reviews. Squashing commits helps during merge time, but it does not improve the reviewer's experience at that moment. The shared capacity of CI runners and minutes is also spent on unnecessary tasks, potentially crowding out the reviewers waiting for their own checks.

Additionally, CI serves two purposes: acting as a gate for changes to be merged and running the agent's scratch runner. When CI is both the gate and the agent's test runner, a red build can mean "the agent is still working" or "this change is broken", causing people to lose trust in red builds. To address this, split the checks based on their purpose:

1. Tests for the code changed by the agent: run fast feedback while editing on the agent's machine.

2. Full suite before a pull request: run the full suite before asking for review, either on the agent's machine or a larger leased machine for heavy suites.

3. Required checks on the pull request: run the gate before merge on CI.

For the third point, when the full suite is heavier than the agent's machine, run just that step on a larger machine and release it afterwards. This approach ensures that each agent has its own machine, allowing them to run the entire pipeline without the need to rely on CI. On Sandscale, each agent gets a workspace with its own Firecracker microVM, disk, ports, CPU, and memory, where the repository, dependencies, and session persist between sessions. Installing dependencies only once enables running one test file as if it were the only task.

To make this split explicit, review the AGENTS.md file. The third line reads, "Before opening a PR, run the full suite once: `npm run test:all`." This ensures that agents do not resort to guessing when CI fails on something that passed locally. Instead, they should report the differences in the pull request and seek clarification.

Finally, everything that makes CI a gate should remain in CI: required checks, a clean checkout, and the same rules for people and agents. Protecting tokens and triggers is also essential. By moving the loop out of CI, CI becomes more trustworthy, not less. A red build now means the change is broken, as the agent has already run its checks before pushing.

With this separation, agents iterate quickly, their own machine providing cheap feedback and readable output. CI maintains its gate function, allowing the team to accomplish more without queueing behind each other.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

A blog post could run commands on your laptop through MCP Inspector. What localhost doesn't protect

This is the request Oligo Security used to show CVE-2025-49596: http://0.0.0.0:6277/sse?transportType=stdio&command=touch&args=%2Ftmp%2Fexploited-from-the-browser Port 6277 is where MCP Inspector's…

  • Attackers can run processes on laptop via MCP Inspector proxy.
  • Proxy listens on port 6277 by default, no token needed before v0.14.1.
  • MCP Inspector patched vulnerability in v0.14.1 with session token and Origin header check.

Adding SSE Live Updates Logged Out Users With Multiple Tabs: Fixing the Refresh Token Race

Everything worked until we shipped live updates We added live updates to our app with Server-Sent Events (SSE). When someone approves a request, every other user sees it right away, with no page…

  • Users experienced logout when opening app in multiple tabs with SSE live updates.
  • Keycloak's refresh token rotation invalidated old tokens during simultaneous refreshes.
  • Fix implemented using Web Locks API to ensure single token refresh per tab.

I writes code fast, so I use skills to build the gates that catch the bugs unit tests miss

Why green unit tests stopped giving me confidence When a coding agent can generate a new component or reactive helper in 20 seconds, writing code is no longer the bottleneck.

  • Introduces 4-skill workflow to catch bugs missed by unit tests
  • Spec skill defines measurable success criteria and state boundaries
  • Formal-verification skill catches silent bugs in reactive graphs and state machines

More from Tuesday, 1 December 2026 →