{"version":1,"type":"story","url":"https://digestai.news/story/i-kept-the-rules-for-the-ai-to-follow-in-a-place-where-the-ai-could-re","json":"https://digestai.news/story/i-kept-the-rules-for-the-ai-to-follow-in-a-place-where-the-ai-could-re.json","markdown":"https://digestai.news/story/i-kept-the-rules-for-the-ai-to-follow-in-a-place-where-the-ai-could-re.md","slug":"i-kept-the-rules-for-the-ai-to-follow-in-a-place-where-the-ai-could-re","headline":"I Kept the \"Rules for the AI to Follow\" in a Place Where the AI Could Remove Them","summary":"I initially stored many protective rules—such as preventing API keys from appearing on screen and blacklisting dangerous operations—in configuration files that the AI could also edit. After an AI‑generated critique pointed out that the rules’ location, not their content, was the weak point, I realized the AI could simply bypass them.\n\nI relocated the key‑hiding setting to a file that only an administrator can modify, and I added a pre‑execution check that blocks any attempt to display keys. The AI’s regular permissions can no longer change that setting. I also keep a confirmation prompt before any command runs and set spending limits on the service that issued the API keys. These steps create a boundary where damage stops, even if the AI ignores the written rules. This piece reflects my personal experience and recommendations rather than a universal solution.","keyPoints":["Author stored protective rules for Claude Code in files the AI could edit, exposing a vulnerability","Moved key‑hiding configuration to an administrator‑only location, preventing AI modification","Suggests confirmation prompts and service‑side limits to contain AI‑induced damage"],"whyItMatters":"It illustrates practical safeguards developers can apply when AI agents run locally, highlighting permission‑based controls to avoid accidental data leaks or destructive actions.","category":{"slug":"agents","name":"Agents & Tools","url":"https://digestai.news/category/agents"},"entities":{"companies":["OpenAI"],"models":["Claude Code"],"people":[]},"firstPublishedAt":"2026-11-30T06:41:00Z","updatedAt":"2026-11-30T06:41:00Z","sourceCount":1,"hasPrimarySource":false,"sources":[{"outlet":"note.com","title":"I Kept the \"Rules for the AI to Follow\" in a Place Where the AI Could Remove Them","url":"https://note.com/posimai_project/n/nb749f09bb6bc?hl=en","publishedAt":"2026-11-30T06:41:00Z","type":"press","primary":false,"lead":true}],"sourceNotes":null,"discussions":[],"thread":{"title":"Claude Code Struggles With Negative Prompting","url":"https://digestai.news/thread/manager-uses-claude-code-what-not-to-do-over-what-to-do","storyCount":3},"cite":{"text":"Digest AI, \"I Kept the \"Rules for the AI to Follow\" in a Place Where the AI Could Remove Them\", 30 November 2026, https://digestai.news/story/i-kept-the-rules-for-the-ai-to-follow-in-a-place-where-the-ai-could-re","publisher":"Digest AI","title":"I Kept the \"Rules for the AI to Follow\" in a Place Where the AI Could Remove Them","datePublished":"2026-11-30T06:41:00Z","url":"https://digestai.news/story/i-kept-the-rules-for-the-ai-to-follow-in-a-place-where-the-ai-could-re"},"generatedBy":"Written by Digest AI's editorial model from the linked sources; the sources are the record.","license":"Headlines, digests and key points are written by Digest AI and may be quoted with a link to the story page. Linked articles belong to their publishers. Terms: https://digestai.news/terms#reuse"}