{"slug": "opus-5-how-to-fix-verbose-output", "title": "Opus 5: How to Fix Verbose Output", "summary": "Anthropic's Opus 5 model produces verbose output, and a developer offers four methods to fix it, from writing rules in CLAUDE.md to using output styles. The developer explains that output styles, which modify the system prompt, are more effective than CLAUDE.md rules because they are re-surfaced during the conversation. The developer provides a paste-ready reply-shape rule and instructions for creating a custom output style.", "body_md": "You might have noticed that Opus 5 is extremely eager to talk. It is like the uncle at the family party who always has an overly long, boring story about literally anything, and no request is too small to set one off.\n\nAsk said uncle for a one-line change and you'll get the long history of why the code needed changing, why he never spotted it sooner, how it was not his change in the first place, and how this whole thing reminds him of a story... which was the right call, mind you, and here is how you might approach the problem next time. Your `CLAUDE.md`\n\nhas said `Be concise. No preamble.`\n\nnear the top for a year. On 4.x it mostly listened. On 5 the line is still sitting there, in the same file, in the same position, and the model reads straight past it.\n\nI gave someone four paths for this in a Reddit thread. Here they are again, weakest lever first.\n\nWrite the rule down first. It is the obvious move and the weakest one. `Be concise`\n\non its own barely registers, because it names nothing the model can act on. A rule that names the shape you want does better. Here is the one I use for reply verbosity, paste-ready for your own `CLAUDE.md`\n\n:\n\n```\n## Reply shape\n- Lead with the answer in the first sentence, before any table, list, or caveat.\n- Carry status, comparisons, and any multi-item result in a `table` or `bullet` list, never a prose paragraph.\n- Cap unbroken prose at two paragraphs; if a third starts, convert the run to a `bullet` list or `table`.\n- Give each item its own `bullet` row, not a clause buried across sentences.\n- Compose in this shape from the start; do not draft prose and reshape it afterward.\n```\n\nOne caveat to keep in mind: a short confirmation is already the answer. `Done.`\n\nor `Yes, that works.`\n\nshould not get tabulated into a wall. The rule is about shape when there is something to shape.\n\nEven written this tightly, a `CLAUDE.md`\n\nline is advice, and it competes against everything else the model is holding. On Opus 5 there is more of that than there used to be. I went into why a line that worked on 4.x can go quiet on 5 in a separate piece, [Opus 5: Delete your CLAUDE.md?](https://reporails.com/articles/opus-5-delete-your-claudemd): the model reaches for more of your rules at once and checks its own work by default, so even a sharp rule gets crowded out. Write the rule, but do not expect it to hold on its own.\n\nAn output style is a step up, and the reason is where it lands. A `CLAUDE.md`\n\nfile rides in as a user message after the system prompt; an output style modifies the system prompt itself, and Claude Code adds its instructions to the end of that prompt (per the [output-styles docs](https://code.claude.com/docs/en/output-styles)). Same kind of instruction, but it travels through the session better. Being in the system prompt, it is not one more user-turn line competing with everything else you have said, and the docs note Claude Code re-reminds the model to follow the active style during the conversation, so the rule gets re-surfaced rather than decaying after one appearance.\n\nYou can switch to a terser built-in style, or write your own. To turn the reply-shape rule from the last section into a style, save it at `.claude/output-styles/reply-shape.md`\n\nand give it a frontmatter header. The header is the part that makes it an output style rather than plain text:\n\n```\n---\nname: Reply shape\ndescription: \"Answer-first, scannable replies; tables and bullets over prose walls\"\nkeep-coding-instructions: true\n---\n\n... the instructions from the first point ...\n```\n\nThe same five reply-shape lines from the last section go in the body below that header. `keep-coding-instructions: true`\n\nkeeps Claude Code's built-in engineering behavior and changes only how it communicates. Then pick the style from `/config`\n\nunder Output style. (The standalone `/output-style`\n\ncommand was removed; it lives under `/config`\n\nnow.) It is read once at session start, so a change takes effect after `/clear`\n\nor a new session. Still instruction, so the model can still drift, but it drifts less than from a line buried in a file.\n\nThe rule and the style are both instruction, and the model can weigh instruction and set it aside. A hook is different. It is a script the harness runs at a fixed moment, and it can refuse. That makes it the strongest of the three levers, and the one worth showing in full.\n\nClaude Code fires a `Stop`\n\nhook the moment the model finishes a turn, and hands the hook the finished reply on stdin as `last_assistant_message`\n\n, so it can read what was just written. If the reply runs long, exit 2 blocks the stop and sends a line back to the model telling it to answer again, shorter. Drop this in `.claude/hooks/gate-length.sh`\n\nand make it executable:\n\n``` bash\n#!/usr/bin/env bash\n# Stop hook: if the reply ran long, send it back once to tighten up.\n\n# The Stop event hands us the finished reply on stdin.\nreply=\"$(jq -r '.last_assistant_message // \"\"')\"\n\n# Your bar. Word count here; a line count or a preamble check works the same way.\nlimit=180\nwords=\"$(printf '%s' \"$reply\" | wc -w | tr -d ' ')\"\n\nif [ \"$words\" -gt \"$limit\" ]; then\n  # Exit 2 blocks the stop; this line goes back to the model as its instruction.\n  echo \"Your reply ran ${words} words; the budget is ${limit}. Rewrite it under ${limit} words: put the answer in the first sentence, then cut the preamble, the recap, and the summary of what you did.\" &gt;&amp;2\n  exit 2\nfi\n\nexit 0\n```\n\nThen wire it in `.claude/settings.json`\n\n. A `Stop`\n\nhook takes no matcher:\n\n```\n{\n  \"hooks\": {\n    \"Stop\": [\n      {\n        \"hooks\": [\n          { \"type\": \"command\", \"command\": \"${CLAUDE_PROJECT_DIR}/.claude/hooks/gate-length.sh\" }\n        ]\n      }\n    ]\n  }\n}\n```\n\nChange `limit`\n\n, or swap the word count for a line count or a grep for opening filler. It cannot loop forever: Claude Code caps a `Stop`\n\nhook at five consecutive blocks with no tool call between them, then lets the turn end.\n\nWe run a version of this on our own agents. The system that writes and reviews the Reporails codebase has a `Stop`\n\n-boundary check that reads each reply and sends it back when it runs too verbose or breaks format. It fired on the drafts of this article more than once.\n\nBy now you have three levers: a rule, a style, and a hook. A plugin is how you stop rebuilding them. It bundles any of the three so the setup travels with you across projects instead of getting re-pasted into each repo, and a Claude Code plugin can carry hooks, output styles, and rules together. It adds no strength of its own; the job is portability.\n\nTo make one, drop a `.claude-plugin/plugin.json`\n\nmanifest next to your `hooks/`\n\nand rules, test it with `claude --plugin-dir ./your-plugin`\n\n, then install it, yours or someone else's, from a marketplace with `/plugin install`\n\n. Anthropic's [plugins docs](https://code.claude.com/docs/en/plugins) carry the manifest fields and the marketplace steps.\n\nReach for the least you can get away with. A `CLAUDE.md`\n\nrule for the parts a human reads too. An output style when you want the model leaning terser by default. The hook when you want a floor on length the model cannot talk its way past. A plugin once you are tired of setting those up again in every repo.\n\nThe three levers are one move underneath: they decide what the model is holding when it answers, and whether anything checks the answer after it lands. The plugin only carries them. Reply length is the version of that you notice first. The harder version is which of your rules the model actually follows once you have written a hundred of them that quietly disagree, and that one is worth its own piece. It is the one I am writing next.\n\n*I work on Reporails, deterministic diagnostics and governance for the instruction files, rules, and prompts that steer coding agents. It reads the steering surface you wrote down and diagnoses why your steering drifts, with measured evidence: which instructions couple to behavior, which name nothing the model can bind to, and where two rules cannot both hold. It does not run your model, and it does not vote; it measures the file.*", "url": "https://wpnews.pro/news/opus-5-how-to-fix-verbose-output", "canonical_source": "https://dev.to/reporails/opus-5-how-to-fix-verbose-output-4amn", "published_at": "2026-08-14 18:17:39+00:00", "updated_at": "2026-08-14 18:35:12.005297+00:00", "lang": "en", "topics": ["large-language-models", "ai-products", "developer-tools"], "entities": ["Anthropic", "Opus 5", "Claude Code"], "alternates": {"html": "https://wpnews.pro/news/opus-5-how-to-fix-verbose-output", "markdown": "https://wpnews.pro/news/opus-5-how-to-fix-verbose-output.md", "text": "https://wpnews.pro/news/opus-5-how-to-fix-verbose-output.txt", "jsonld": "https://wpnews.pro/news/opus-5-how-to-fix-verbose-output.jsonld"}}