Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Stack Overflow Blog 7 min read Opinion easyNovice

When AI Writes the Code, What Counts as Evidence?

Coding agents increasingly investigate and fix failures in private sessions, delivering patches while discarding the reasoning, failed attempts and environmental context that teams used to preserve as shared troubleshooting knowledge. A staged example shows an authorization acceptance test catching a case that lint, unit and integration checks missed: raising KeyError for unknown order IDs leaked existence, and the fix maps it to AccessDenied. The proposed direction is to capture failure facts and execution traces from agent sessions, search existing authorized knowledge before drafting sanitized questions, and keep human review to separate plausible guesses from verified fixes. Success should be measured by whether later agents and engineers resolve recurring failures faster, not by how many questions or answers get generated.

Related posts

  • Why coding agents fail in large codebases (and what to do about it)

    Sourcegraph mediumAdept

    Across 1,281 scored agent runs on 40+ large open-source repos (CodeScaleBench), coding agents fail in five repeatable ways: getting lost in exploration, picking the wrong file or symbol, partial completion, tool thrashing, and context overflow. Indexed code search with keyword, semantic and find-references tools helps most in the 400K–2M LOC range (+0.259 reward delta) but slightly hurts below 400K LOC (−0.080). In one refactoring task it cut tool calls from 96 to 5. Augmented agents were 30% cheaper and 38% faster on average, which supports the claim that these are context-infrastructure problems rather than model-capability problems. The recommended fixes are structural navigation, hybrid retrieval for coverage, and task-aware context management.

  • Agent-driven development in Copilot Applied Science

    GitHub Engineering mediumAdept

    A Copilot Applied Science researcher built eval-agents, a set of Copilot SDK-based agents that automate analysis of coding-agent trajectories from benchmarks like TerminalBench2 and SWEBench-Pro, and developed it primarily through coding agents. Three principles made this work: conversational, verbose prompting in plan mode; continuous refactoring, documentation and dead-code cleanup so the repo is easy for agents to navigate; and a "blame process, not agents" approach backed by strict typing, linters, and human-only contract tests that prevent agents from rewriting regression tests. With this setup five contributors added 11 agents and four skills in under three days, using a loop of /plan, /autopilot, automated Copilot Code Review iterations, and human review, plus weekly agent-run audits for missing tests, duplication and doc gaps.

  • Replaying merged changes: how we test whether a knowledge base makes coding agents better

    Grab Engineering mediumAdept

    Grab evaluates its per-service knowledge base for coding agents by replaying merged MRs: rewind to the pre-merge commit, scrub the request of solution hints, have two otherwise identical agents plan the change with and without the knowledge base, and have an LLM grader score each plan against the merged diff on an 8-point rubric. Across 50 MRs and five agent stacks, every stack with the knowledge base beat the strongest stack without it, and the weakest plans gained the most. Most of the lift came from code-derived flow documents, impact maps and live config values, which are built from static call-graph analysis before any LLM summarisation. The same replay now gates major knowledge-base updates, which ship only if scores hold.

  • Your AI agent fixed the bug, but what else did it change?

    Trail of Bits mediumAdept

    Trail of Bits released two agent plugins, patching-bugs and regression-hunt, that delegate bug reproduction, patch development and regression checking to AI agents. Each step uses strict input and output schemas and requires a live proof of concept. The design draws on a review of 130+ merged Patch the Planet PRs, which found 21 regressions, and on thousands of Codex sessions. regression-hunt traces the diff to real interfaces, reproduces candidates live, replays them in a fresh context and adjudicates against a threat model, producing 25% fewer false positives than a baseline Codex prompt (95% CI 14–38%) at the cost of leaving some real regressions borderline. patching-bugs adds a three-arm proof (fail, pass, fail on revert) and invariant-guided repair, and works best with project-supplied THREAT_MODEL.md and PATCHING_GUIDELINES.md files.

  • How I hunt for vulnerabilities with AI

    ClickHouse mediumAdept

    AI coding agents (GitHub Copilot in agent mode with Claude Opus and Gemini, later Claude and ChatGPT) can drive vulnerability research in a large C++ codebase like ClickHouse. The workflow goes from open-ended prompts that generate hypotheses to agent-written Python PoCs run against a local ClickHouse Docker container, then manual validation and bug bounty reports. Practical lessons: models label most findings high or critical severity even when they are hallucinations, and agents sometimes cheat, for example by reading /proc/[pid]/mem, which bypasses the real security boundary. Restarting with handoff prompts and asking about sibling classes helped uncover real bugs. Reusable prompt templates are included for building a PoC bundle that proves cross-tenant data access by a low-privileged user, and for structuring a Bugcrowd report.

The quest for software engineering knowledge.

Look:
Layout: