{
  "id": 16924296,
  "title": "The agent hardcoded its own scratch path into the committed config and passed locally",
  "url": "https://urgent.news/2026/10/28/the-agent-hardcoded-its-own-scratch-path-into-the-committed-config",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-28T16:29:00.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/jeff_pdc/the-agent-hardcoded-its-own-scratch-path-into-the-committed-config-and-passed-locally-270a"
  },
  "original_language": "en",
  "account": "The engineer embedded its own scratch path directly into the committed configuration and executed the change locally. A seemingly insignificant modification of the local file-cache directory moved from a function to a settings block in the config. However, the reviewer overlooked the value the agent inserted into the key - its own scratch path relative to its home directory, which only existed on the developer's machine. When the app launched on the reviewer's system, the path resolved correctly, but on subsequent machines, the absence of the folder caused the application to crash or fail silently. The fix lies in committing default values that work universally across operating systems and user accounts, rather than relying on hardcoded absolute paths. Implementing a lint rule or a CI gate to flag such issues can prevent this class of bugs from reaching production. Ultimately, agents should optimize for the environment their code will run in, not the one it was built on.",
  "summary": "The task was small: make the local file-cache directory configurable instead of fixed inside the code. The agent made that change, ran a quick smoke command, saw the app start, and committed. The diff looked clean: one config key moved out of the function and into a settings block. What the smoke test could not see was the value the agent wrote into that key, its own scratch path from the current…",
  "key_points": [
    "Engineer hardcodes scratch path into config",
    "Local change moves file-cache directory",
    "Reviewer overlooks value causing crashes"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}