
What happened
Testing Claude Code 2.1.287 and OpenCode 1.18.34, the author found Claude Code applies deny → ask → allow and stops at the first match, while OpenCode lets the last matching rule win.
Why it matters
In the test, a request to delete data/notes.txt was blocked by OpenCode's edit setting, not by its rm deny rule, because the agent used apply_patch rather than Bash.
What to watch
Since v2.1.283, interactive Claude Code sessions start in auto mode, and acceptEdits auto-approves rm inside the working folder.
WHO IT HITSDevelopers and platform teams who hand routine coding tasks to AI agents need to audit both the Bash rules and the file-editing rules, because a deletion can slip through whichever path is left on allow. For teams running these agents in CI, OpenCode auto-rejects ask prompts in non-interactive runs, so an ask rule there effectively means a hard stop.
Summaries like this, in your inbox every morning.
The article frames permission settings not as a security wall but as a way to reduce the accidents that happen with the commands an agent normally writes. Claude Code's own documentation notes that instructions in prompts or CLAUDE.md affect what Claude tries to do but not what Claude Code permits, so writing "don't read .env" in an instruction file is not a restriction.
Both tools match rules against command strings. Bash(rm *) stops rm -rf build/ but not /bin/rm -rf build/ or bash -c 'rm -rf build/', and Bash(git push *) does not match git -C . push origin main — the article suggests combining sandboxing or containers when OS-level limits are needed.
The comparison table also flags a gap: Claude Code applies a repository's allow rules only after the trust dialog is accepted, while the author found no equivalent statement in OpenCode's documentation. The suggested check is to actually ask each agent four things in a practice repository — read .env, delete a file, git push, and run tests — then verify output with git status and git diff rather than trusting the agent's own report.
Pick your industry and the AI tools you use, and get news related to your work every day.
Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →
Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.
A Qiita article compared automated red-teaming methods for LLM apps — GCG, PAIR, and TAP — using mock implemen…

In a webinar hosted by French Mathematical Society president Isabelle Gallagher, Fields Medal winner Hugo Dumi…

Anthropic said on October 15 it has started giving METR's six staff company devices, office space and access t…

NVIDIA published a blog post titled "AI Security Is an Engineering Problem - How to Solve It at Every Layer of…

Researchers at Microsoft published a paper titled "Adoption and Impact of Command-Line AI Coding Agents: A Stu…

At the Most Powerful Women Summit, Marissa Mayer said anyone who claims to know how AI will play out is 'eithe…
