{"slug": "when-you-paste-an-error-into-an-ai-agent-you-re-handing-it-your-conclusion", "title": "When you paste an error into an AI agent, you're handing it your conclusion", "summary": "A developer argues that pasting only an error message or stack trace into an AI coding agent hands the model a pre-formed conclusion rather than the actual bug, since the agent patches the quoted line instead of the underlying cause. The recommended workflow is to paste three things in order — the request/response pair alongside the spec — and then ask the agent \"what input would still break this?\" before applying any patch. The author built this request-response-spec adjacency into Powerduck, a local-first OpenAPI studio.", "body_md": "You hit a 500 in your API. You copy the stack trace, paste the last three lines into the agent, and write \"why is this breaking?\"\n\nThe agent dutifully suggests a null check on the line in the trace. You apply it. The test goes green. Production still fails on the third request, because the null was caused by the request shape from a client nobody on your team had tested with yet.\n\nWhat you pasted wasn't the bug. It was your conclusion about which part of the bug mattered.\n\nStack traces are useful to a human who already has the context of the whole system. They are close to useless to an agent that has only seen the file you opened and the line you quoted. The agent has no way to know:\n\nSo it does the most reasonable thing it can with the evidence you gave it: it patches the line in the trace. That patch makes the error go away in the test you can run. It does not make the bug go away.\n\nI used to paste just the trace. Now I paste three things, in order:\n\nFor API work specifically, the request/response pair is the unit of evidence. The error text tells you something broke. The pair tells you what broke it. Keeping that pair next to the spec locally is what makes the difference between the agent patching the symptom and the agent actually finding the contract drift that caused the 500 in the first place — which is exactly the workflow I ended up building into [Powerduck](https://www.powerduck.com/), a local-first OpenAPI studio where the request, the response, and the spec sit next to each other instead of living across three tabs.\n\nAfter the agent proposes a patch, before I apply it, I ask one question back: \"what input would still break this?\"\n\nNine times out of ten the agent will immediately list a second case it had not considered — usually the one that was actually failing in production. That single follow-up costs ten seconds and saves a revert. The patch it proposed on the first paste was real code, but it was code that solved the problem you showed it, not the problem you had.\n\nThe error text is the smallest piece of evidence. Treat it that way.", "url": "https://wpnews.pro/news/when-you-paste-an-error-into-an-ai-agent-you-re-handing-it-your-conclusion", "canonical_source": "https://dev.to/jeff_pdc/when-you-paste-an-error-into-an-ai-agent-youre-handing-it-your-conclusion-dc0", "published_at": "2026-10-11 23:27:38+00:00", "updated_at": "2026-10-11 23:35:20.540795+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "large-language-models"], "entities": ["Powerduck"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/when-you-paste-an-error-into-an-ai-agent-you-re-handing-it-your-conclusion", "markdown": "https://wpnews.pro/news/when-you-paste-an-error-into-an-ai-agent-you-re-handing-it-your-conclusion.md", "text": "https://wpnews.pro/news/when-you-paste-an-error-into-an-ai-agent-you-re-handing-it-your-conclusion.txt", "jsonld": "https://wpnews.pro/news/when-you-paste-an-error-into-an-ai-agent-you-re-handing-it-your-conclusion.jsonld"}}