Urgent.News

What's breaking now, across hundreds of outlets.

AI

Your Agent Says Tests Pass. On Your Laptop. Not on CI.

The agent ran the test command, watched the green checkmark, and said done. You opened the PR. Twenty minutes later CI was red. The agent looked at the failing job, shrugged, and said "works on my machine." It was not being smug. It genuinely had no idea what was on your machine that was not on the runner. This is one of the most common and least discussed failure modes in agentic coding. The…

When an agent runs tests on your machine, it inherits everything that makes your environment unique: environment variables, local databases, specific package versions, and more. However, this doesn't match the conditions of your Continuous Integration (CI) system, which typically runs in a clean, isolated environment. The agent's tests can pass on your machine due to factors like local services or fixtures that won't be present in CI, leading to false positives.

The solution is to make the agent run tests in an environment that mirrors CI, not your local setup. This means running the exact command CI uses, in the same order and with the same setup. This ensures the tests are portable and the "green" result truly reflects CI's outcome. The agent should not alter the environment to pass the tests; instead, it should make the tests self-contained or report dependence on external state.

The PR should include the CI-equivalent command and its output for transparency. This discipline ensures the green checkmark truly signifies a working implementation, not just a passing test on your machine.

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 AI

Coinbase's Fraud Agent Never Decides Anything. That's Why It Works.

Coinbase's Fraud Agent Never Decides Anything. That's Why It Works. On October 7–8, 2026, Coinbase published Owning Intelligence , a three-part engineering series on the fraud agent guarding Onramp.

  • Coinbase's Fraud Agent assigns risk levels, doesn't decide final outcome
  • A/B test showed 30% reduction in fraudulent transactions, 22% drop in fraud value
  • Fine-tuned Qwen3.5-9B model improved fraud detection metrics significantly

More from Monday 12 October →