{"slug": "claude-opus-5-makes-writing-code-almost-free", "title": "Claude Opus 5 makes writing code almost free", "summary": "Anthropic's Claude Opus 5 makes writing code nearly free, shifting the bottleneck to reviewing AI-generated changes, as the model's scope expansion is 'expected behavior' per Anthropic's documentation. The article recommends a three-layer defense: steering prompts to constrain scope, human review focused on whether code belongs, and deterministic file-system enforcement to block unauthorized writes.", "body_md": "# Claude Opus 5 makes writing code almost free\n\nThis is the new bottleneck in the AI workflow. We've moved from the \"difficulty of writing\" to the \"difficulty of reviewing.\" Anthropic actually admits this in their documentation; they call this scope blowout \"expected behavior.\" They note that Opus 5 can expand the scope of a task, applying its own judgment to what the task *should* be rather than what you actually asked for.\n\nIf you want to stop these eleven-file surprises from hitting your main branch, you need a defense-in-depth strategy. You can't just rely on a second LLM to \"check the work\"—that often just results in a loop of two models agreeing with each other's mistakes. Instead, you need three specific layers of control.\n\n## Layer 1: Steering (The Scope Constraint)\n\nThe most common mistake I see in prompt engineering is people adding instructions like `verify your work before finishing`\n\nto their `CLAUDE.md`\n\nor system prompts. Don't do this. Anthropic is very clear: Opus 5 already verifies its work. Adding explicit verification instructions actually causes \"over-verification,\" which wastes tokens and provides zero benefit because the model is just confirming that it successfully completed the (overly broad) task it set for itself.\n\nInstead of telling it to \"check its work,\" you need to constrain its scope. You have to give it permission to be smart, but strict boundaries on where that smartness can be applied. A better way to steer the agent is to use a prompt structure like this:\n\n```\nDeliver what was asked, at the scope intended. Make routine judgment\ncalls yourself, and check in only when different readings of the request\nwould lead to materially different work. If the request seems mistaken or\na better approach exists, stop and ask for clarification.\n```\n\nBy focusing on \"scope intended\" rather than \"verify accuracy,\" you are addressing the root cause of the bloat.\n\n## Layer 2: The Human Review\n\nThis is where we sit. Since the model is optimized to finish the job, it will always try to be helpful. Your job in the review phase isn't just to check if the code *works* (the tests do that), but to check if the code *belongs*. When you see a diff, your first question shouldn't be \"Does this pass?\" it should be \"Why did this touch a file I didn't mention?\"\n\n## Layer 3: Deterministic Enforcement\n\nIf you are running an LLM agent in a CI/CD pipeline or a local development environment, the most robust way to prevent scope creep is to use a hard gate. This means using tools that allow you to restrict the agent's write access to specific directories or file patterns. If you ask for a fix in `/src/parsers/`\n\n, and the agent tries to touch `/src/utils/`\n\n, the environment should physically refuse the write operation.\n\nImplementing these layers—steering the prompt, performing a scope-focused review, and using file-system level enforcement—is the only way to turn these agents from \"helpful but chaotic\" into reliable members of your engineering team.\n\n[Next I think we need to talk about how predictable automated scanning →](/en/threads/7905/)\n\n[these AI tool field notes](https://tanyan888.com/), with plenty of directly applicable cases.", "url": "https://wpnews.pro/news/claude-opus-5-makes-writing-code-almost-free", "canonical_source": "https://promptcube3.com/en/threads/7906/", "published_at": "2026-08-27 16:02:07+00:00", "updated_at": "2026-08-27 16:20:35.126636+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "ai-agents", "developer-tools"], "entities": ["Anthropic", "Claude Opus 5"], "alternates": {"html": "https://wpnews.pro/news/claude-opus-5-makes-writing-code-almost-free", "markdown": "https://wpnews.pro/news/claude-opus-5-makes-writing-code-almost-free.md", "text": "https://wpnews.pro/news/claude-opus-5-makes-writing-code-almost-free.txt", "jsonld": "https://wpnews.pro/news/claude-opus-5-makes-writing-code-almost-free.jsonld"}}