{"slug": "ask-hn-how-do-you-guys-stop-coding-agents-from-acting-out-of-line", "title": "Ask HN: How do you guys stop coding agents from acting out of line?", "summary": "A Hacker News user asked for tools and tips to prevent coding agents from violating project protocols, citing difficulties enforcing rules such as requiring autogenerated database migrations. The user noted that simple constraints like not writing to the README are easy to encode, but more complex behavioral rules remain challenging to enforce.", "body_md": "| ||||||||||||\n1 point by |\nI’ve been pretty annoyed recently with my coding agents doing stupid things that are anti-protocol. I can encode rules like “agents shouldn’t write to the README” pretty easily, but things like “database migrations must be autogenerated and not handwritten” are much harder to enforce. Anyone have any tools they use for this or tips for how to deal with issues like that? | |||||||||||\n|", "url": "https://wpnews.pro/news/ask-hn-how-do-you-guys-stop-coding-agents-from-acting-out-of-line", "canonical_source": "https://news.ycombinator.com/item?id=49466458", "published_at": "2026-08-27 15:30:43+00:00", "updated_at": "2026-08-27 15:49:21.415369+00:00", "lang": "en", "topics": ["developer-tools", "ai-agents"], "entities": ["Hacker News"], "alternates": {"html": "https://wpnews.pro/news/ask-hn-how-do-you-guys-stop-coding-agents-from-acting-out-of-line", "markdown": "https://wpnews.pro/news/ask-hn-how-do-you-guys-stop-coding-agents-from-acting-out-of-line.md", "text": "https://wpnews.pro/news/ask-hn-how-do-you-guys-stop-coding-agents-from-acting-out-of-line.txt", "jsonld": "https://wpnews.pro/news/ask-hn-how-do-you-guys-stop-coding-agents-from-acting-out-of-line.jsonld"}}